3 ms·
Not to mention, like... trig functions. I know std::cos et al. need to set errno. Maybe cppfront will get rid of it.
by lainga 3y ago
Not to mention, like... trig functions. I know std::cos et al. need to set errno. Maybe cppfront will get rid of it.
- jzwinck 3y agoCompile with -fno-math-errno. Almost nobody checks errno for math functions, and disabling it can give a huge speedup.
- sesuximo 3y agoIsn’t the issue with functions like this that they are not guaranteed to be the same on all hardware? So making it constexpr could break programs or cause the constexpr evaluated result to differ from the runtime result even for the same inputs
- Longhanks 3y agoWhat does cppfront have to do with it? You can write/download/import/enable constexpr implementations of cos with standard c++ compilers? That’s like saying you can’t drive during winter with your car because it came with summer tires... just change your tires?
- leni536 3y agoconstexpr cmath is coming in C++23