Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Q: string convert to number and any high precision soluation?

Reply
Thread Tools

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

 
 
key9
Guest
Posts: n/a
 
      12-09-2006
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



 
Reply With Quote
 
 
 
 
key9
Guest
Posts: n/a
 
      12-09-2006

>soluation

sorry solution


 
Reply With Quote
 
 
 
 
John W. Krahn
Guest
Posts: n/a
 
      12-09-2006
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
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      12-09-2006


On Dec 9, 4:24 pm, "John W. Krahn" <(E-Mail Removed)> wrote:
> key9 wrote:
>
> > Is there exist some high precision soluation module ?
> > support operation like * + sin() etc.

>
> perldoc bignum


Don't forget Math:ari

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert string number to real number - ValueError: invalid literal davidj411 Python 11 05-29-2008 12:02 AM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
(newbie) Float() and high precision wirecom@wirelessmeasurement.com Python 2 08-10-2006 03:04 PM
HELP - how to convert a string representation of a number to a number ? cpptutor2000@yahoo.com C++ 5 05-21-2005 05:56 PM
high precision Math with 'double' (underflow problem) Wolfgang Java 4 02-24-2004 03:41 AM



Advertisments