Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Is there a better way to call fe(get|set)round?

by BrowserUk (Pope)
on Jul 02, 2007 at 13:26 UTC ( #624436=note: print w/replies, xml ) Need Help??

in reply to Re: Is there a better way to call fe(get|set)round?
in thread Is there a better way to call fe(get|set)round?

You missed the point again. The rounding mode being queried or altered by the OP, is that of the math coprocessor and is applied to the results of all FP operations done by it. The 4 modes are as defined by the IEEE Floating Point standard. The two calls, fe(get|set)round are C/C++ compiler provided functions to get/set that hardware rounding mode.

Moving to using software emulated, infinite precision FP to achieve the same end would for most applications be a disaster. With Math::BigFloat, FP calculations run anything from a few hundred to a few 10s of thousands times more slowly depending upon the configuration and underlying libraries used. Okay if your calculating the final cost of a few dozen items in an IO bound shopiing cart application, but for any kind of serious math, way too slow.

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^2: Is there a better way to call fe(get|set)round?

Replies are listed 'Best First'.
Re^3: Is there a better way to call fe(get|set)round?
by HollyKing (Pilgrim) on Jul 04, 2007 at 18:56 UTC
    Yes, exactly. Thanks!

    Owl looked at him, and wondered whether to push him off the tree; but, feeling that he could always do it afterwards, he tried once more to find out what they were talking about.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://624436]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-02-18 09:35 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (253 votes). Check out past polls.