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
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)