Set Rounding mode for IEEE floating point operations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Set Rounding mode for IEEE floating point operations

Steffen Märcker
Hi,

is there any way to set the rounding mode for IEEE floating point
operations? Maybe something like

> Double roundToMinusInfWhile: [... code goes here ...]Double  
> roundToZeroWhile: [... more code here ...]

If not, is it possible to add this behavior, e.g., via a custom primitive?

Best, Steffen

Reply | Threaded
Open this post in threaded view
|

Re: Set Rounding mode for IEEE floating point operations

SergeStinckwich


On Mon, Jan 15, 2018 at 12:27 PM, Steffen Märcker <[hidden email]> wrote:
Hi,

is there any way to set the rounding mode for IEEE floating point
operations? Maybe something like

Double roundToMinusInfWhile: [... code goes here ...]Double roundToZeroWhile: [... more code here ...]

If not, is it possible to add this behavior, e.g., via a custom primitive?


​This might interesting to have something like that for PolyMath, but I'm a little worried of subtle consequences
that might appear in UI if you use points for examples.​

--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC/UY1)
"Programs must be written for people to read, and only incidentally for machines to execute."
http://www.doesnotunderstand.org/
Reply | Threaded
Open this post in threaded view
|

Re: Set Rounding mode for IEEE floating point operations

Steffen Märcker
Yes, I was considering this in the context of some approximation  
algorithms. Maybe one of the VM experts here could comment on the  
possibility to implement that?


Am .01.2018, 10:00 Uhr, schrieb Serge Stinckwich  
<[hidden email]>:

> On Mon, Jan 15, 2018 at 12:27 PM, Steffen Märcker <[hidden email]> wrote:
>
>> Hi,
>>
>> is there any way to set the rounding mode for IEEE floating point
>> operations? Maybe something like
>>
>> Double roundToMinusInfWhile: [... code goes here ...]Double
>>> roundToZeroWhile: [... more code here ...]
>>>
>>
>> If not, is it possible to add this behavior, e.g., via a custom  
>> primitive?
>>
>>
> ​This might interesting to have something like that for PolyMath, but  
> I'm a
> little worried of subtle consequences
> that might appear in UI if you use points for examples.​