Skip Menu |

This queue is for tickets about the Math-Algebra-Symbols CPAN distribution.

Report information
The Basics
Id: 14209
Status: new
Priority: 0/
Queue: Math-Algebra-Symbols

People
Owner: Nobody in particular
Requestors: vanuxemg [...] yahoo.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: sample of sqrt is false
This sample is false: $x = symbols(qw(x)); $z = sqrt(-$x**2); print "$z\n"; # $i*$x since if x = -2 result is -x * i (2*i) Cheers, Greg
Thanks for your note. ** has priority over - in Perl, so -$x**2 == $x**2, the sqrt of which is both -$x and +$x. One of the failings of Symbols is that it does not carry all radicles - it should recognize that sqrt is multi valued and keep both possible results in play until perhaps another **2 renders them moot. [guest - Wed Aug 17 07:16:47 2005]: Show quoted text
> This sample is false: > > $x = symbols(qw(x)); > $z = sqrt(-$x**2); > print "$z\n"; > # $i*$x > > since > if x = -2 > result is -x * i (2*i) > > Cheers, > > Greg