In #MinMinLight , real numbers are represented with rational a+b/c (a,b,c intege...
Baillehache Pascal @baillehache_pascal@hachyderm.io
In #MinMinLight , real numbers are represented with rational a+b/c (a,b,c integers). I want to see if the gain in accuracy is worth the loss in speed. A flag at compilation time allows me to switch between rationals and standard IEEE floats. This also allows me to compare results between both, hence to check my implementation of rationals.
So far, I could implement the following:
* conversion from/to real
* reduction of the fractional part
* basic operators (add, sub, mul, div, neg, inv, abs)
* comparison operator
* infinity and NaN
* power (integer and real exponent)
* exponential and logarithm
* square root
* piecewise gaussian