Range/Interval based floating point computation

discussion of forwardcom instruction set and corresponding hardware and software

Moderator: agner

Post Reply
renoX
Posts: 1
Joined: 2019-01-28, 14:44:55

Range/Interval based floating point computation

Post by renoX »

Hello,

One thing I thought about is that sometimes FP are "not good enough" because you don't know the precision of the values computed, if you need more reliable numbers there is interval/range arithmetic: a range with an lower and upper value, this is much reliable because you know that the real value is in between these bounds and you have an upper bound of the precision.

One difficulty with interval arithmetic is that the computations with the lower bound must be done with a rounding toward -infinity and the computations with the upper bound must be done with rounding toward +infinity, and changing the rounding state of the FPU is usually very expensive..
Would it be possible that the ForwardCom CPU think about this (unusual I know) requirement: being able to change the state of the FPU "cheaply" from one rounding mode to another?
Providing full support for interval arithmetic would be probably too difficult to add for a probably not very used feature, even if it would provide much higher performance for multiplication for example (where you have to check the sign of the numbers to know which is the correct combination of bounds that you select).

Best regards,
renoX
agner
Site Admin
Posts: 184
Joined: 2017-10-15, 8:07:27
Contact:

Re: Range/Interval based floating point computation

Post by agner »

It is possible to change the rounding mode globally using the Numeric control register, or for an individual instruction or even for a single vector element using a mask register.
Post Reply