>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
DS> Okay, I'm whipping together the "fancy math" section of the interpreter
DS> assembly language. I've got:
DS> sin, cos, tan : Plain ones
DS> asin, acos, atan : arc-whatevers
DS> shinh, cosh, tanh : Hyperbolic whatevers
DS> log2, log10, log : Base 2, base 10, and explicit base logarithms
DS> pow : Raise x to the y power
DS> Can anyone think of things I've forgotten? It's been a while since I've
DS> done numeric work.
i am not being picky, but there is secant, and arc hyperbolics too. you
can derive secant from the others (gack, i forget how!) but then tan is
just sin/cos and that is usually supplied anyway. some langs have exp
which is just pow( e, power ).
what about providing e and pi as builtin functions with controllable
precision. they would return a float or a bigfloat depending on the
precision requested. with no args they would return a float with maximal
precision for that size.
how complete do you want this? why make it built in and not a math
module with its own op codes?
and i would think math is low priority right now and would rather see
you spend your valuable time on more generic and critical parrot
stuff. this information comes from an echelon profile of your keyboard
input. :)
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs -------------------------- http://jobs.perl.org