I wrote a #C implementation of the #SquareRoot #sqrt #algorithm , in binary, with 64.0 integer input and 32.32 fixed point output.
#c #squareroot #sqrt #algorithm
I implemented (in #Haskell) a #SquareRoot #sqrt #mathematics #algorithm I found on maths stackexchange, O(N^2) for N output digits but needs only addition, subtraction, shifts, and multiplying numbers by a single digit, and is simple to perform by hand with paper and pen.
#haskell #squareroot #sqrt #mathematics #algorithm
Last few days, I ripped all #string #sqrt and mem #functions from my #antibrowser thin client. Not sure why puts is still there it must be embedded in a not-my-macro? dunno. No big surprise, the notstrtol state machine kicks the standard #gcc's at least I think it does. I had to add dummy writes to dev/null to coerce the compiler to not collapse a 10million iteration loop. Really happy with the result.
#gcc #antibrowser #functions #sqrt #string
One day, one decomposition
A029705: Squarefree n such that Q(sqrt(n)) has class number 5
3D graph, threejs - webGL ➡️ https://decompwlj.com/3Dgraph/A029705.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A029705.html
#decompwlj #maths #mathematics #sequence #OEIS #javascript #php #3D #squarefree #sqrt #class #number #graph #threejs #webGL
#webgl #threejs #graph #number #class #sqrt #squarefree #3d #php #javascript #oeis #sequence #mathematics #maths #decompwlj
One day, one decomposition
A029702: Q(sqrt(n)) has class number 2
3D graph, threejs - webGL ➡️ https://decompwlj.com/3Dgraph/A029702.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A029702.html
#decompwlj #maths #mathematics #sequence #OEIS #javascript #php #3D #sqrt #class #number #graph #threejs #webGL
#webgl #threejs #graph #number #class #sqrt #3d #php #javascript #oeis #sequence #mathematics #maths #decompwlj
One day, one decomposition
A007066: a(n) = 1 + ceiling((n-1)*phi^2), phi = (1+sqrt(5))/2
3D graph #threejs #webGL ➡️ https://decompwlj.com/3Dgraph/A007066.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A007066.html
#decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #ceiling #phi #sqrt #graph
#graph #sqrt #phi #ceiling #numbers #3d #php #javascript #oeis #sequence #mathematics #math #decompwlj #webgl #threejs
One day, one decomposition
A006446: Numbers k such that floor(sqrt(k)) divides k
3D graph #threejs #webGL ➡️ https://decompwlj.com/3Dgraph/A006446.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A006446.html
#decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #Numbers #floor #sqrt #divides #graph
#graph #divides #sqrt #floor #numbers #3d #php #javascript #oeis #sequence #mathematics #math #decompwlj #webgl #threejs
TL;DR: -fno-math-errno should always be set in C/C++ land. (unless you're using VC, then: I'm sorry)
libm is "still" burdened with language where some functions (most importantly sqrt & sqrtf) will set 'errno'. Compilers "respect" this by default. IEEE-754 won a long time ago. It's WAY past time to flip math-errno to default to off.
One day, one decomposition
A001952: A Beatty sequence: a(n) = floor(n*(2 + sqrt(2)))
3D graph #threejs #webGL ➡️ https://decompwlj.com/3Dgraph/A001952.html
2D #graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A001952.html
#decompwlj #math #mathematics #Beatty #sequence #OEIS #javascript #php #3D #integer #number #floor #sqrt
#sqrt #floor #number #integer #3d #php #javascript #oeis #sequence #Beatty #mathematics #math #decompwlj #graph #webgl #threejs