Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Okay! What!?!?!?

by trizen (Hermit)
on Apr 23, 2014 at 14:45 UTC ( #1083376=note: print w/replies, xml ) Need Help??


in reply to Re: Okay! What!?!?!?
in thread Okay! What!?!?!?

Go suffers from this problem too. It uses an arbitrary number representation for constants only, which are computed at compile-time.

For example, the following code:

package main import "fmt" func main() { x := 14.4; y := 10.0; fmt.Printf("%.49f\n", x) fmt.Printf("%.49f\n", x+y-y) }
Outputs:
14.4000000000000003552713678800500929355621337890625 14.3999999999999985789145284797996282577514648437500

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1083376]
help
Chatterbox?
Discipulus can red from white wine just even smelling it, blindfolded
Discipulus can tell..
[holli]: I'd like to put that to the test under lab conditions

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2017-09-25 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?