Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Long Division (*solved*)
#1
Code:
CLS

dim bigNum as LONG
let bigNum=25000


print "bignum=";bigNum
PRINT
print "10*bigNum=";10*bigNum
PRINT
print "bigNum/10=";bigNum/10

The LONG division code seems borked. It always returns zero.
Reply
#2
britlion Wrote:
Code:
CLS

dim bigNum as LONG
let bigNum=25000


print "bignum=";bigNum
PRINT
print "10*bigNum=";10*bigNum
PRINT
print "bigNum/10=";bigNum/10

The LONG division code seems borked. It always returns zero.
It was a bug, yes. LONG (not ULONG) division was failing for positive divisors. *Fixed*.
Download 1.2.5-r1513g: <!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb/zxbasic-1.2.5r1514g.msi">http://www.boriel.com/files/zxb/zxbasic-1.2.5r1514g.msi</a><!-- m -->
Reply
#3
And I just noticed before I upgraded that mod was not working either - but since it's the same asm that produces it, that's not too surprising.

I can report that MOD works nicely on LONG again.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)