Large numbers
#4
I'm still having trouble, as I don't fully understand the variable types.

I'm wondering if this is something that can be done in QB64 or if this requires another language.

I want to compare these two values, and it needs to be precise.  I found that QB64 considered these equal (it appears to have rounded the results) and it's possible, even likely, that it's just my mistake.

Value 1:  int (600,851,475,143 / 347)
Value 2:  600,851,475,143 / 347

I just want the integer version compared to the raw version.  If it evenly divides then they are equal.  If not, then they aren't.

According to my phone calculator, the actual result of this is:

1,731,560,447.097983

So Value 1 isn't  equal to Value 2. 

Can anyone advise on the correct or proper variable types to allow this to work?  Or is this a limitation of QB64?

The results I got in QB64 are 1,731,560,448 for both Value 1 and Value 2

Using this code

Code: (Select All)
checka& = Int(aa&& / p(s))
checkb# = aa&& / p(s)
Reply


Messages In This Thread
Large numbers - by james2464 - 08-29-2022, 08:28 PM
RE: Large numbers - by SMcNeill - 08-29-2022, 08:31 PM
RE: Large numbers - by james2464 - 08-29-2022, 08:39 PM
RE: Large numbers - by james2464 - 08-30-2022, 01:56 AM
RE: Large numbers - by SMcNeill - 08-30-2022, 03:35 AM
RE: Large numbers - by james2464 - 08-30-2022, 12:40 PM
RE: Large numbers - by DSMan195276 - 08-30-2022, 04:20 AM
RE: Large numbers - by james2464 - 08-30-2022, 01:00 PM
RE: Large numbers - by mdijkens - 08-30-2022, 11:07 AM
RE: Large numbers - by james2464 - 08-30-2022, 12:11 PM



Users browsing this thread: 5 Guest(s)