Int(1.48/0.02) = 73 instead of 74
Bug #387070 reported by
Hoffmann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GCalctool |
Fix Released
|
Medium
|
|||
gcalctool (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: gcalctool
I was trying to calculate a radio channel. The frequency of the first channel is 74.215 MHz, the frequency of my channel is 75.695 MHz. The distance between two channels is 0,02 Mhz and the first channel is #347. (Just for the interested ones, this is german 4m-Band BOS).
Now I use Int(347 - (75.695 - 74.215)/0.02) = 420.
But if I do it without Int() it results in 75.695 - 74.215)/0.02 = 421.
I looked it up and the right channel would be 421. So where is the problem? If I convert 421 to Int it results in 421, so the Int-function can't be the problem as well...
description: | updated |
Changed in gcalctool: | |
status: | Unknown → Confirmed |
Changed in gcalctool: | |
status: | Confirmed → Fix Released |
Changed in gcalctool: | |
importance: | Unknown → Medium |
To post a comment you must log in.
If I do the following:
347 - (75.695 - 74.215)/0.02
I get 273 (in both gcalctool and other calculators). What version of gcalctool are you using? Are you using decimal base?