VERIFIED SOLUTION i
X

MapInfo Pro 12.5 rounding issues

Issue

There appears to be rounding issues in MapInfo Pro 12.5.

If you were to enter the below inputs in to the MapBasic Window you will get reported results:

Using 0.01 rounding factor: 
Print "Rounding 0.025 -> " + Round(0.025, 0.01) 
Print "Rounding 0.035 -> " + Round(0.035, 0.01) 
Print "Rounding 0.045 -> " + Round(0.045, 0.01) 
Print "Rounding 0.055 -> " + Round(0.055, 0.01) 

We produce:
Rounding 0.025 -> 0.03 <- correct 
Rounding 0.035 -> 0.04 <- correct 
Rounding 0.045 -> 0.04 <- incorrect (would expect 0.05) 
Rounding 0.055 -> 0.06 <- correct 

Using 0.1 rounding factor: 
Print "Rounding 0.25 -> " + Round(0.25, 0.1) 
Print "Rounding 0.35 -> " + Round(0.35, 0.1) 
Print "Rounding 0.45 -> " + Round(0.45, 0.1) 
Print "Rounding 0.55 -> " + Round(0.55, 0.1) 

We produce:
Rounding 0.25 -> 0.2 <- incorrect (would expect 0.3) 
Rounding 0.35 -> 0.3 <- incorrect (would expect 0.4) 
Rounding 0.45 -> 0.5 <- correct 
Rounding 0.55 -> 0.6 <- correct 

Using 1 rounding factor: 
Print "Rounding 2.5 -> " + Round(2.5, 1) 
Print "Rounding 3.5 -> " + Round(3.5, 1) 
Print "Rounding 4.5 -> " + Round(4.5, 1) 
Print "Rounding 5.5 -> " + Round(5.5, 1) 

We produce:
Rounding 2.5 -> 3 <- correct 
Rounding 3.5 -> 4 <- correct 
Rounding 4.5 -> 5 <- correct 
Rounding 5.5 -> 6 <- correct 

Cause

This is a known issue logged under MIPRO-65405.

Resolution

UPDATED: April 3, 2017


Contact Technical Support for an update on MIPRO-65405.

Downloads

  • No Downloads