in reply to Strange Logic in Power of arithmetic

Windows 7 x64 with Strawberry 5.18.1 64-bit.

VinsWorldcom@C:\Users\VinsWorldcom\tmp> perl -v This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x +64-multi-thread [...] VinsWorldcom@C:\Users\VinsWorldcom\tmp> test.pl Power of calculation test line 1: -8 line 2: -1.#IND line 3: -1.#IND line 4: -1.#IND

Replies are listed 'Best First'.
Re^2: Strange Logic in Power of arithmetic
by stephanm (Sexton) on Jan 27, 2016 at 12:08 UTC
    Wow, nice variety of different results.... My version was:
    This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x +86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2012, Larry Wall Binary build 1604 [298023] provided by ActiveState http://www.ActiveSt +ate.com Built Apr 14 2014 14:32:20
    on
    Vista Home Premium, Service Pack 2, 32 bit architecture.
    It seems to indicate there is some kind of glitch with my implementation. Maybe it's time to upgrade. Thanks for your inputs.
      Wow, nice variety of different results

      Note that -1.#IND, nan, -nan and NaN are just different ways of denoting the same value - namely "not a number".

      Cheers,
      Rob