At 10:29 PM -0400 4/27/04, Matt Fowles wrote:
All~
Perhaps it is just the mathematician in me speaking, but I think
that a sqrt op might be superfluous and could be replaced with exp
as sqrt(x) == exp(x,0.5). I cannot say anything about numerical
stability of precision, though, so feel free
>>>>> "MF" == Matt Fowles <[EMAIL PROTECTED]> writes:
MF> Perhaps it is just the mathematician in me speaking, but I think that
MF> a sqrt op might be superfluous and could be replaced with exp as
MF> sqrt(x) == exp(x,0.5). I cannot say anything abou
On Tue, 2004-04-27 at 22:29, Matt Fowles wrote:
> All~
>
> Perhaps it is just the mathematician in me speaking, but I think that a
> sqrt op might be superfluous and could be replaced with exp as sqrt(x)
> == exp(x,0.5). I cannot say anything about numerical stability of
>
All~
Perhaps it is just the mathematician in me speaking, but I think that a
sqrt op might be superfluous and could be replaced with exp as sqrt(x)
== exp(x,0.5). I cannot say anything about numerical stability of
precision, though, so feel free to shoot me down.
Matt
Dan Sugalski wrote:
At
At 4:50 PM +0200 4/27/04, Stefan Lidman wrote:
>Everything is right, except... you forgot either the -c or -u switch
for the diff. (And no, I don't know why the default output from diffs
is mostly useless. Just one of those things, I expect)
ok resend with -u switch.
And it's in. Thanks!
--
@
goto NEXT();
}
+
+
+=item B(out NUM, in INT)
+
+=item B(out NUM, in NUM)
+
+Set $1 to the square root of $2.
+
+=cut
+
+inline op sqrt(out NUM, in INT) :base_core {
+ $1 = sqrt((FLOATVAL)$2);
+ goto NEXT();
+}
+
+inline op sqrt(out NUM, in NUM) :base_core {
+ $1 = sqrt((FLOATVAL)$2)
At 3:29 AM +0200 4/27/04, Stefan Lidman wrote:
This adds a square root op and fixes a typo. It is also my
first patch so I might have missed something, please tell
me what I did wrong.
Everything is right, except... you forgot either the -c or -u switch
for the diff. (And no, I don't know why the
/math.ops,v
retrieving revision 1.17
diff -r1.17 math.ops
853a854,873
>
>
> =item B(out NUM, in INT)
>
> =item B(out NUM, in NUM)
>
> Set $1 to the square root of $2.
>
> =cut
>
> inline op sqrt(out NUM, in INT) :base_