[Info-vax] New VSI Roadmap (yipee!)

Paul Sture nospam at sture.ch
Sun Mar 1 04:32:29 EST 2015


On 2015-03-01, John Reagan <xyzzy1959 at gmail.com> wrote:
> On Friday, February 27, 2015 at 6:37:14 PM UTC-5, David Froble wrote:
>
>> We have a subprogram to round a D-float number:
>> 
>> Call NRound( Z , 2% )
>> 
>> The second parameter is the number of fraction decimal places.
>> 
>> Every time it's called, there is subprogram frame set-up and break-down, 
>> and it has proven to be significant.  I'm aware that we can compile in a 
>> manner to suppress that overhead.  Regardless, Bill's request is for a 
>> built in rounding function.  Something like:
>> 
>> Z = FRound( Z , 2% )
>> 
>> I'm not sure what this would mean for anything other than D-Float ..
>> 
>> How would you handle that, rounding for all the available floating point 
>> types?  Different function names for each?
>
> 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?

It depends what data type Z is.  When I first read the above I was
imagining a string for display or print purposes, but it could be
a packed or string decimal data type (subject to Basic support for
those).

-- 
Don't ever use the last two versions of GCC in serious stuff :)
              -- fortune cookie seen on GCC Bugzilla – Bug List



More information about the Info-vax mailing list