Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 6 13:24:54 PDT 2016


On Saturday, 6 August 2016 at 12:48:26 UTC, Iain Buclaw wrote:
> There are compiler switches for that.  Maybe there should be 
> one pragma to tweak these compiler switches on a per-function 
> basis, rather than separately named pragmas.

This might be a solution for inherently compiler-specific 
settings (although for LDC we would probably go for "type-safe" 
UDAs/pragmas instead of parsing faux command-line strings).

Floating point transformation semantics aren't compiler-specific, 
though. The corresponding options are used commonly enough in 
certain kinds of code that it doesn't seem prudent to require 
users to resort to compiler-specific ways of expressing them.

  — David


More information about the Digitalmars-d mailing list