Q: string convert to number and any high precision soluation?

Discussion in 'Perl Misc' started by key9, Dec 9, 2006.

  1. key9

    key9 Guest

    Hi all

    Take these for example;

    $var="3.14"
    $var2="100"

    $pi="3.1415926535897932384626"
    $large = "30003213000000000000"


    Q1
    how to convent these to number explicit?
    I means I don't care precision now.

    Q2
    Is there exist some high precision soluation module ?
    support operation like * + sin() etc.



    appreciate
    key9
     
    key9, Dec 9, 2006
    #1
    1. Advertising

  2. key9

    key9 Guest

    Re: string convert to number and any high precision soluation?


    >soluation

    sorry solution :p
     
    key9, Dec 9, 2006
    #2
    1. Advertising

  3. key9 wrote:
    >
    > Take these for example;
    >
    > $var="3.14"
    > $var2="100"
    >
    > $pi="3.1415926535897932384626"
    > $large = "30003213000000000000"
    >
    >
    > Q1
    > how to convent these to number explicit?
    > I means I don't care precision now.


    They already are numbers.

    perldoc perlnumber


    > Q2
    > Is there exist some high precision soluation module ?
    > support operation like * + sin() etc.


    perldoc bignum



    John
    --
    Perl isn't a toolbox, but a small machine shop where you can special-order
    certain sorts of tools at low cost and in short order. -- Larry Wall
     
    John W. Krahn, Dec 9, 2006
    #3
  4. On Dec 9, 4:24 pm, "John W. Krahn" <> wrote:
    > key9 wrote:
    >
    > > Is there exist some high precision soluation module ?
    > > support operation like * + sin() etc.

    >
    > perldoc bignum


    Don't forget Math::pari
     
    Brian McCauley, Dec 9, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wolfgang
    Replies:
    4
    Views:
    5,231
    Andrew Hobbs
    Feb 24, 2004
  2. Replies:
    2
    Views:
    313
  3. Donkey

    How to Define High-precision Date type

    Donkey, Mar 31, 2006, in forum: C Programming
    Replies:
    15
    Views:
    450
  4. Leigh Sharpe
    Replies:
    7
    Views:
    518
    Larry Smith
    Mar 28, 2007
  5. GCRhoads
    Replies:
    7
    Views:
    413
    user923005
    Jul 20, 2007
Loading...

Share This Page