Floating-point/fixed-point arithmetic
Posted: Tue Oct 15, 2013 6:39 pm
In coding my port of Ken Perlin's noise generator, I discovered there are no library functions for floating-point or fixed-point arithmetic (or my setup is configured incorrectly.) For example, the following reveals no __divdf3 implementation upon compilation:
With this in mind, what options do I have for decimal point arithmetic? I understand floating-point emulation is slow, however, this will be used for a map generator that runs once (with a waiting screen) so speed is not too much an issue. Is there a library I can use for real number arithmetic, either fixed-point or floating-point arithmetic?
Code: Select all
double divide(double x, double y) {
return x / y;
}