you are viewing a single comment's thread
view the rest of the comments
[–] 16 points 10 months ago* (5 children)

I got hung up on this line:

This requires deterministic math with explicit rounding modes and precision, not the platform-dependent behavior you get with floats.

Aren't floats mostly standardized these days? The article even mentions that standard. Has anyone here seen platform-dependent float behaviour?

Not that this affects the article's main point, which is perfectly reasonable.

  • source
  • hideshow 10 child comments
  • [–] 24 points 10 months ago

    Mostly standardized? Maybe. What I know is that float summation is not associative, which means that things that are supposed to be equal (x + y + z = y + z + x) are not necessarily that for floats.

  • source
  • parent
  • [–] 13 points 10 months ago (1 child)

    Floating-Point Determinism | Random ASCII - tech blog of Bruce Dawson https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/

    The short answer to your questions is no, but if you're careful you can prevent indeterminism. I've personally ran into it encoding audio files using the Opus codec on AMD vs Intel processors (slightly different binary outputs for the exact same inputs). But if you're able to control your dev environment from platform choice all the way down to the assembly instructions being used, you can prevent it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 0 points 10 months ago* (2 children)

    If you count the programming language you use as ‘platform’, then yes. Python rounds both 11.5 and 12.5 to 12.

  • source
  • parent
  • hideshow 4 child comments