[Zorba-coders] [Bug 984031] Re: negative result for fib(95)

2012-04-17 Thread Matthias Brantner
Yes, you are absolutely right. It's because I had Zorba compiled without
big number support.

** Changed in: zorba
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/984031

Title:
  negative result for fib(95)

Status in Zorba - The XQuery Processor:
  Invalid

Bug description:
  declare function local:fib($n as xs:integer) as xs:integer
  {
   if ($n eq 0) then 0
   else if ($n eq 1) then 1
   else local:fib($n - 1) + local:fib($n - 2)
  };

  local:fib(95)

  gives  -4953053512429003327 but should return 31940434634990099905.
  This seems to be a overflow in numerics. fib(90) gives the correct
  result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/984031/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 984031] Re: negative result for fib(95)

2012-04-17 Thread Paul J. Lucas
Since there's apparently no way to edit a comment, the previous comment
should read:

I thought we agreed a long time ago not to check for either overflows or
underflows when ZORBA_WITH_BIG_INTEGER=OFF.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/984031

Title:
  negative result for fib(95)

Status in Zorba - The XQuery Processor:
  New

Bug description:
  declare function local:fib($n as xs:integer) as xs:integer
  {
   if ($n eq 0) then 0
   else if ($n eq 1) then 1
   else local:fib($n - 1) + local:fib($n - 2)
  };

  local:fib(95)

  gives  -4953053512429003327 but should return 31940434634990099905.
  This seems to be a overflow in numerics. fib(90) gives the correct
  result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/984031/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 984031] Re: negative result for fib(95)

2012-04-17 Thread Paul J. Lucas
I thought we agreed a long time ago neither not to check for either
overflows or underflows when ZORBA_WITH_BIG_INTEGER=OFF.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/984031

Title:
  negative result for fib(95)

Status in Zorba - The XQuery Processor:
  New

Bug description:
  declare function local:fib($n as xs:integer) as xs:integer
  {
   if ($n eq 0) then 0
   else if ($n eq 1) then 1
   else local:fib($n - 1) + local:fib($n - 2)
  };

  local:fib(95)

  gives  -4953053512429003327 but should return 31940434634990099905.
  This seems to be a overflow in numerics. fib(90) gives the correct
  result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/984031/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp