Skip Menu |

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

Report information
The Basics
Id: 132144
Status: new
Priority: 0/
Queue: Math-Complex

People
Owner: Nobody in particular
Requestors: peter.john.acklam [...] gmail.com
Cc:
AdminCc:

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



Subject: Inconsistent behaviour in many functions
In general, when the input to a function is a Math::Complex object, the output is also a Math::Complex object, but the are some odd exceptions. I consider this inconsistent behaviour to be a bug. The following cases return a Perl scalar, not a Math::Complex object: $x = Math::Complex->new(0); $z = asin($x); $x = Math::Complex->new(1); $z = acos($x); $x = Math::Complex->new(0); $z = atan($x); $x = Math::Complex->new(-100); $z = tanh($x); $x = Math::Complex->new(100); $z = tanh($x); $x = Math::Complex->new(1); $z = acosh($x);
It is the same for the sqrt() function. The following returns a Perl scalar, not a Math::Complex object: $x = Math::Complex->new(4); $z = sqrt($x);