Ticket #5 (assigned enhancement)

Opened 3 years ago

Last modified 3 years ago

Large exponents don't work correctly (integers don't promote to decimal)

Reported by: andy.elvey@… Owned by: jvargas
Priority: minor Milestone: milestone1
Component: Orca Version: 1.0
Keywords: exponents Cc:

Description (last modified by krobillard) (diff)

I'm using Orca v0.0.24 on Fedora Core 5. I've found that large exponents don't work correctly. If you do (say) 2 ** 4, the answer is correct (16). But when large exponents are tried, the answers are incorrect. A sample session is shown below.

ORCA 0.0.24 (May 23 2006)
O> 5 ** 40
== -1413876383
O> 2 ** 4
== 16
O> 2 ** 100
== 0
O> 2 ** 30
== 1073741824
O> 2 ** 35
== 0
O>

Change History

Changed 3 years ago by krobillard

  • type changed from defect to enhancement
  • description modified (diff)
  • summary changed from Large exponents don't work correctly to Large exponents don't work correctly (integers don't promote to decimal)

Unlike Rebol, Orca does not promote integers to decimals. If you run those examples with at least one of the values as decimal they will return the correct results.

I changed this issue from a bug to an enhancement. If enough users want Rebol behavior we can change this, though I prefer the current behavior which is simpler to implement. There have been times when auto-promotion to another datatype has caught me unaware and I was forced to add 'to-int to convert back for correct results.

Changed 3 years ago by jvargas

  • version set to 1.0

Changed 3 years ago by jvargas

  • owner changed from krobillard to jvargas
  • status changed from new to assigned
  • milestone set to milestone1
Note: See TracTickets for help on using tickets.