hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

10K
active users

At some point, I'll learn CORDIC. But part of me doesn't want to because I don't want the magic ruined. Kinda like Rubik's cubes.

It feels like like a cheat code to calculate complex functions. Like, it shouldn't work at all.

According to @kenshirriff, the original 8087 uses CORDIC. With all the rounding bullshit that FP arith has to do it surprises me that it's a good fit.

But I also don't understand it well.

@cr1901 @kenshirriff CORDIC has no role in arithmetic, only trig functions. The x87 trig insns have always been useless for implementing decent trig functions. Slower & less accurate than the obvious implementations.

@dalias @cr1901 @kenshirriff what they said. A few steps of CORDIC still useful for atan(2) argument reduction, more if the only fast operation you have is addition. Otherwise use polynomial approximations everywhere.

@steve @cr1901 @kenshirriff What is atan argument reduction? atan isn't periodic.

@dalias @cr1901 @kenshirriff that doesn’t mean you can’t reduce the argument! log and exp aren’t periodic either (at least, not on the real line), and we do argument reduction for them as well.

@dalias @cr1901 @kenshirriff expanding a bit more, I would say argument reduction is any process you use to go from evaluating a function on a larger interval to evaluating a related function on a smaller (in the sense of “computationally easier”) interval.

Cassandrich

@steve @cr1901 @kenshirriff Yes, I didn't immediately realize how that would work for atan but surely there are trig identities or whatnot that should do it, and I guess you apply CORDIC to the inverse functions involved in that.