3 ms·
Good idea! Here it is in C: http://pastie.org/1824968 http://pastie.org/1824968 (You have to manually add the 'f' after the constants if you want to do the whol
by AretNCarlsen 16y ago
Good idea! Here it is in C: http://pastie.org/1824968 http://pastie.org/1824968
(You have to manually add the 'f' after the constants if you want to do the whole thing in floating-point, as well as uncommenting the correct Dollars_t definition.)
For the range $20.00 to $200.00, no exact matches to an integer original price (in cents) for the algorithms ceiling, floor, or round, in float or double. This was on a 32-bit Xeon server (EC2).