Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Need more precision.

by Tux (Canon)
on Jun 10, 2015 at 06:25 UTC ( [id://1129800]=note: print w/replies, xml ) Need Help??


in reply to Need more precision.

As nobody mentioned this so far, I'll bite on "perl has not and my compiler has" part. Perl by default configures/compiles to "normal" doubles, but it has an option to use long doubles for NV types.

Configure your perl with -Duselongdouble

$ perl -V:uselongdouble\|nvsize nvsize='16'; uselongdouble='define'; $ perl -MData::Dumper -wE'say Dumper cos 1' $VAR1 = '0.540302305868139717';
$ perl5.10.1 -V:uselongdouble\|nvsize nvsize='8'; uselongdouble='undef'; $ perl5.10.1 -MData::Dumper -wE'say Dumper cos 1' $VAR1 = '0.54030230586814'; $

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Need more precision.
by syphilis (Archbishop) on Jun 10, 2015 at 06:51 UTC
    Configure your perl with -Duselongdouble

    On Windows, you can build in long double support only with perl-5.22.0 and later ... and even then only if you're using a MinGW port of the gcc compiler.

    Cheers,
    Rob
Re^2: Need more precision.
by BrowserUk (Patriarch) on Jun 10, 2015 at 06:39 UTC

    My compiler (MSVC) "supports" the long double type, but "The long double type is identical to the double type."

    So it does me no good at all. Thanks for the thought though :)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-25 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found