PREC - adjust number of decimal points of floating point number Math functions
SYNTAX prec(ARRAY, precision ) RETURNS ARRAY FUNCTION Truncates ARRAY to precision decimal places. EXAMPLE The formula "prec( 10.12981, 2 )" returns 10.120. The formula "prec( 10.12981, 4 )" returns 10.12980. SEE ALSO ----- Original Message ----- From: ang_60 To: amibroker@yahoogroups.com Sent: Sunday, June 13, 2010 12:23 PM Subject: [amibroker] Round function Hi everybody, I'm trying the list because, most surely, I'm not the first to face this need: I'd like to round a number to the second decimal e.g. 41.3305 to 41.33 (in other word, ?i'd like a round function like the one in MS Excel....). AFL built in "round()" function can round a number just to the nearest integer. What is the more convenient way to get the desired output in AFL? Thanks