I find the result very strange. Why not 0.3? Can somebody tell me why this result? Is it possible to fix this.
?- X is 5.3-5.
X = 0.2999999999999998.
?-
My second question is how would I transform from 'hour' notation '13.45' ---->'15.30' into numbers of hours ? For example the period above calculated 15.30-13.45 would be 1.85. But I need to operate on parts of the hour and not the remainders of the numbers. Like 15 1/2 - 13 /4, this way is better. I try
?- X is (5.3-5)*100/60.
X = 0.4999999999999997.
?- X is (5.3-5)*100//60.
ERROR: ///2: Type error: `integer' expected, found `29.999999999999982'
Any suggestions?