Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: (OT) Where is programming headed?

by Rudif (Hermit)
on Dec 15, 2001 at 14:52 UTC ( #132203=note: print w/replies, xml ) Need Help??


in reply to Re: (OT) Where is programming headed?
in thread (OT) Where is programming headed?

Dominus

>> integral values less than about 253 will be represented and compared exactly

Since this OT is turning into a C refresher course, factual accuracy should be in order. Your statement is true of C/C++ double, which is also what Perl uses for numeric values. The example  float x, y; declares a couple of single-precision floats, which can represent exactly integral values of up to about 225.

A summary of IEEE-754 format can be found here and an interactive converter here.

Rudif

Replies are listed 'Best First'.
Re: (OT) Where is programming headed?
by Dominus (Parson) on Dec 15, 2001 at 21:35 UTC
    Says rudif:
    Your statement is true of C/C++ double, which is also what Perl uses for numeric values. The example float x, y;
    Oops! You are absolutely right. My brain is so stuck on doubles that I often forget about single-precision floats.

    Anyway, my main point, which was that the number 1 is exactly representable, is still correct.

    Thanks for the correction.

    --
    Mark Dominus
    Perl Paraphernalia

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132203]
help
Chatterbox?
[LanX]: ; is for optional prototypes
[LanX]: & is codeblock @ array
[GotToBTru]: okay, that is there in the text, not in literal use in any of the examples
[GotToBTru]: the text suggest it is redundant before @
[LanX]: propably ... I also notice new stuff

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-01-18 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (164 votes). Check out past polls.