Promoting to Complex

Andrew Whitworth wknight8111 at gmail.com
Sun Sep 26 18:29:09 UTC 2010


My thought on this is definitely "yes". If Parrot provides an
operation, it should produce the correct result over the largest
possible input range. We do allow users to override the default types
and many default behaviors, but for people who don't take that step we
should still provide the best possible default. We do offer a built-in
Complex PMC, so there's no extra overhead in producing the correct
results.

--Andrew Whitworth



On Sun, Sep 26, 2010 at 1:58 PM, Paul C. Anagnostopoulos
<paul at windfall.com> wrote:
> Folks,
> Should PMC functions with partial complex ranges promote their result to a
> Complex? For example, should sqrt(negative Float) produce a Complex? This
> issue does not pertain to native numbers, since we never promote them to
> PMCs.
> There is precedence for doing this. For example, Integer promotes to BigInt
> when necessary.
> ~~ Paul
>
> ----------------------------------------------------------------
> Windfall               Paul C. Anagnostopoulos
>       ----------------------------------------------------------
>    Software              978 371-2316
>                              www.windfall.com
> ----------------------------------------------------------------
> Metaphorical invocations ... often suffer from the
> weakness of giving such satisfaction to the human
> mind that they tend to be mistaken for incisive and
> illuminating observations. ---Torkel Franzen
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
>


More information about the parrot-dev mailing list