I have a program created with AMS5 that converts hours to minutes. It also converts the hours (say a decimal fraction like 2.0125 hours) to hours and minutes. The program converts the hours into minutes by multiplying by 60. In this example, the result is 120.75 minutes. So far so good. Then, when I try to convert these 120.75 minutes into hours + minutes, I encounter a problem. I decided to strip the integer portion of this decimal number by using the Math.Floor function. So far I have the number 120.75 stored in the variable Min, which prints to the screen correctly as 120.75. The code I used is:
WholeMin = Math.Floor(Min);
This stores the number 120 in the variable WholeMin. Then I strip off this integer portion with the following code:
MinFxn = Min - WholeMin;
This stores the number 0.75 in the variable MinFxn. To convert the minutes to hours (in the variable Hr1) plus minutes (in the variable Min1), I used:
Hr1 = WholeMin / 60; (this stores 2 in Hr1)
and
Min1 = MinFxn;
The code I used to display Min1 is:
Paragraph.SetText("Min1Para", Min1.."");
Unfortunately, the result displaying in this paragraph object is 0.75000000000001 rather than 0.75
Is there something wrong with Math.Floor function or is it something I have done?

