Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Using Safe to reval complex math

by djantzen (Priest)
on Jun 05, 2003 at 21:30 UTC ( [id://263518]=note: print w/replies, xml ) Need Help??


in reply to Using Safe to reval complex math

Safe::permit takes an Opcode, and "sqrt" is part of the :base_math category, so double check that you're calling the version you think you are. Also try checking the value of $@ after the call to reval.


"The dead do not recognize context" -- Kai, Lexx

Replies are listed 'Best First'.
Re: Re: Using Safe to reval complex math
by Anonymous Monk on Jun 05, 2003 at 22:03 UTC

    Thanks for the feedback.

    I am actually checking $@, just not in the snippet. That is how i caught the above griping about Can't locate object method "make".

    In different permutations of things I have tried, I have had it using the base sqrt as well as the Math::Complex::sqrt. It is easy to tell the difference, because base sqrt will return something like Can't take sqrt of -4 whereas Math::Complex will give you 2i

    --Anonymous Original Poster Monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found