Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Yet again: floats are not expressed accurately

by bliako (Monsignor)
on Mar 21, 2023 at 10:49 UTC ( [id://11151092]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # gcc a.c
    #include <stdio.h>
    ...
        float x = 226.0;
        if( ABS(x-226.0)>0.00000001 ){ printf("ajaja\n"); }
    }
    
  2. or download this
    perl -V:nvtype -V:nvsize
    nvtype='double';
    nvsize='8';
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11151092]
Approved by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 18:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found