At 12:12 PM 9/8/2001 -0400, Uri Guttman wrote:
> >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>   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 ).

Secant in it's variations, along with the arc hyperbolics are now in. As is 
exp.

>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.

Good idea. We'll do that.

>how complete do you want this? why make it built in and not a math
>module with its own op codes?

They strike me as a reasonable set of things to have. They don't, I 
suppose, have to be part of the base opcode set.

>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. :)

Ah, I'm not actually going to write these, just get them in the 
documentation. Not that writing them is tough--for example, the entire 
opcode function to take the tangent of an NV constant is:

   AUTO_OP tan_n_nc {
     NUM_REG(P1) = tan(P2);
   }

which, as you would probably admit, isn't that tough. :) (There's actually 
more text in the support files than in the actual source module)

Besides, this stuff's quick and satisfying to whip out while I'm debugging 
annoying memory allocation problems. It's nice to have simple things to do 
that will work first time...

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to