Hi Mike,

Yes - I am getting the same result as you: 9.07

4D Server 13.2
Windows 7, 64 bit
Active4D 6.0.6

- Clayton


On Thu, Jan 31, 2013 at 11:23 AM, Mike Vogt <[email protected]>wrote:

> Hi All,
> Can anyone else reproduce this?
>
> I'm getting incorrect results when doing the following in an Active4D
> script:
>
> $cost:=50
> $rate:=18.15
> $fee:= $cost*$rate/100
> $fee_rounded:=Round($fee;2)
>
> When I do this and display it in an page, $fee is 9.075, and $fee_rounded
> is 9.07.
>
> If I create a function in 4D:
>
> //Function test_round:
>
>   C_real($0;$1)
>   $0:=Round($1;2)
>
> //End function
>
> If I then replace the last line of code above to:
> $ fee_rounded:=test_round($fee)
>
> and display it in an page, $fee is 9.075, and $fee_rounded is 9.08.
>
> In other words, Round, when called directly in an Active4D script produces
> incorrect results (9.07), but when call from a 4D function works
> correctly(9.08).
>
> 4D Server 12.4
> Windows 2008 server, 64 bit
> Active4D v6.0 r6
>
> Any help appreciated.
>
> TIA,
> MV
>
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/
>



-- 

*Clayton Donahue*

iVantage Health Analytics
300 Chestnut St. Ste. 101 | Needham, MA 02492
direct: 781.247.2071 | o: 781.449.5287 | f: 781.449.8058
email: [email protected]  web: www.ivantagehealth.com

___________________________________________________

Intelligence for the *new* healthcare
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to