Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BIGINT help.
#1
I downloaded the program BIGINT and read the README (although I didn't understand it 100%).

This is what I did. I opened BIGINT.BAS into QBASIC. I then typed in this code at the bottom (with two random numbers I wanted to divide).

'$INCLUDE:'BIGINT.BI'
DIV$ = "455725081051"
THROUGH$ = "457"
PRINT SI.Divide$(DIV$, THROUGH$)


When I ran the program, it gave me the asnwer of 1200000000, which isn't correct (the asnwer should have been 997210243).

Could someone please show me what I am doing wrong (I want to be able to divide an integer between 0 and 1,000,000,000,000 by another integer between 1 and 100,000, and be able to multiply integers.)?

Please keep in mind that I have just started learning QBASIC and a lot of things may not make sense to me.

Thanks.

*EDIT* I was looking at the source code to BIGINT.BAS compared to the code it showed while the program was in QBASIC. When it was in QBASIC, this is what the last few lines were:

CONST LN.E = 2.718281828#
DEFINT A-Z
'$DYNAMIC
'$END_META


When looking at the source, there were a lot more lines of code below those 4. Is that supposed to happen or could that be why I get incorrect numbers?
Reply
#2
well, bigint is still in its "bug-testing" stage, it was just made neo a little while ago. he'll be glad to hear this, so he can fix it.

but then again, your values arent so large that they arent totally imprecise using double precision floating point numbers. try this code and you might be pleasantly surprised Smile

Code:
a# = 455725081051#
b# = 457

c# = a# / b#
PRINT c#
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)