lacaranian / surreal Goto Github PK
View Code? Open in Web Editor NEWA Haskell library representing the class of surreal numbers
License: MIT License
A Haskell library representing the class of surreal numbers
License: MIT License
There should be robust conversion functions between surreal numbers and the other numerical types that lie within the field. These include:
The code is currently sitting in a monolithic file without any modularity. This should be changed to a module which does not export utility functions.
Find a way to represent infinite sets of surreals in the left or right set of a surreal, allowing for representation of infinite ordinals and infinitesimals, and numbers such as 1/3.
Division of surreal numbers is a monster. The left set and right set of the result of division are defined in terms of one another, which has the potential to require an infinite sequence of surreals to provide a valid result. The formula for the division of two surreal numbers (restricting z_L to positive options) is:
x = y / z = y * {0 , (1+(z_R-z)_x_L)/z_R , (1+(z_L-z)_x_R)/z_L | (1+(z_L-z)_x_L)/z_L , (1+(z_R-z)_x_R)/z_R }
An example: 1/3 is equal to {0|} / {2|}, which produces {0 , (1-x_R)/2 | (1-x_L)/2} (null left or right sets render their "blueprint" unusable, so it won't contribute new elements). This produces {0 , (1-x_R)/2 | 1/2 , (1-x_L)/2}, which then allows {0 , 1/4 , (1-x_R)/2 | 1/2 , (1-x_L)/2}, and so on, until the infinite sequences become {0 , 1/4 , 5/16 ... | 1/2 , 3/8 , 11/32 ...}. This is a correct representation of 1/3, but takes an infinite amount of memory to represent in the current paradigm.
The evaluation speed for simple arithmetic operations is dismal. This is due primarily to the recursive structure of a surreal, which causes any recursively defined operation to explode as the number of operations increases. I need to ensure that the canonical form of a surreal is preferred and the evaluation of operations that would typically involve large thunks when evaluated lazily is made strict.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.