[Info-vax] New VSI Roadmap (yipee!)
John Reagan
xyzzy1959 at gmail.com
Sun Mar 1 15:52:57 EST 2015
On Sunday, March 1, 2015 at 10:07:48 AM UTC-5, Stephen Hoffman wrote:
> On 2015-03-01 04:33:55 +0000, John Reagan said:
> > Rounding floating point to certain number of decimal places? That
> > doesn't make sense. Floating numbers are exact. 1.23 isn't really
> > 1.23 but something close to it. I don't know what a float-to-float
> > rounding does?
>
> Z = 1.2345678
> Z = FRound( Z, 2%)
> Z = 1.23
> Z = 1.2378
> Z = FRound( Z, 2%)
> Z = 1.24
>
I know. You want to throw away fractions of a penny or pick up fractions of a penny. If you want to "create" money, go mine for Bitcoin.
The reality is that the routine overhead is small compared to the floating/integer operations involved. There is no simple instruction sequence to do that (since it isn't something people do with normal floating point data), it will always be slow. I would think that GEM would inline that routine if it was defined in the same module.
More information about the Info-vax
mailing list