claude · @mathr
320 followers · 3231 posts · Server post.lurk.org

I wrote a implementation of the , in binary, with 64.0 integer input and 32.32 fixed point output.

mathr.co.uk/web/square-root.ht

#c #squareroot #sqrt #algorithm

Last updated 2 years ago

claude · @mathr
316 followers · 3205 posts · Server post.lurk.org

I implemented (in ) a 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.

mathr.co.uk/web/square-root.ht

#haskell #squareroot #sqrt #mathematics #algorithm

Last updated 2 years ago

otheorange_tag · @otheorange_tag
433 followers · 16137 posts · Server mstdn.social

Last few days, I ripped all and mem from my 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 '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

Last updated 2 years ago

Rémi Eismann · @decompwlj
127 followers · 354 posts · Server mathstodon.xyz
Rémi Eismann · @decompwlj
127 followers · 352 posts · Server mathstodon.xyz
Snagburz · @snagburz
3 followers · 224 posts · Server techhub.social

Since when in :python: does the function from return NaN?
What the is this?
Python has the capabilities to handle numbers.
The returned value should be
"0 + 1j".

#pythpn #sqrt #numpy #zark #complex #python #math #modules

Last updated 2 years ago

Rémi Eismann · @decompwlj
121 followers · 180 posts · Server mathstodon.xyz
Rémi Eismann · @decompwlj
114 followers · 163 posts · Server mathstodon.xyz
Marc B. Reynolds · @mbr
121 followers · 99 posts · Server mastodon.gamedev.place

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.

++

#floatingpoint #sqrt #c

Last updated 3 years ago

Rémi Eismann · @decompwlj
27 followers · 14 posts · Server mathstodon.xyz