Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Factorials of rational numbers up to 999.9

by SimonClinch (Deacon)
on May 16, 2011 at 12:09 UTC ( #905053=note: print w/replies, xml ) Need Help??

in reply to Factorials of rational numbers up to 999.9

On AIX, Perl v5.8.2, the message is clearer:

Math::Complex::make: Cannot take real part of Math::BigFloat.

And as I expected, it goes away, producing 7.61401993629603e+24, when the use bignum is removed.

Math::Complex has no idea that you have invoked bignum and has incompatible methods for this type of data. Some obvious choices are:

1) override and rewrite all the required Complex methods to be bignum-aware (check if bignum is loaded in a new "new" method) or

2) settle for no bignum

Update: or rewrite the gamma function from scratch using bignum, for reference:

One world, one people

  • Comment on Re: Factorials of rational numbers up to 999.9

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://905053]
[stevieb]: ffs... an hour I've been trying to get a Pi to communicate I2C to an Arduino. Had to slow down the communication channel. Sigh

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2017-06-22 22:39 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (531 votes). Check out past polls.