I want to roundup below result to ...upto two places like 3.13....how could i achieve that
please help
Discussion posts and replies are publicly visible
roundup(7.36819e+12,2) gives the result of 7.37
Not working
You are trying to round up 3.138428e+12 (which is equivalent to 3138428000000) to 2 decimal points. How's that can be possible? roundup() will work when you will have a value containing decimal points. For example: roundup(3.1414, 2) gives 3.14
ok.. got it, but i want lesser value
What do you mean by lesser value?
Acc to your code, 11^12 will return 3.138428e+12 only
I don’t like to study at all, I went to university only to calm my parents down. And in order not to waste time writing papers, I simply turn to services https://cheap.essaydoc.com/ that write essays for me quickly and efficiently. And I rest and get good grades
Also don't forget the fixed() function, just note it does return a text value of the number:
a!localVariables( local!base: 1+ri!interest, local!power: power(local!base,ri!months), /*local!round: round(local!power,3),*/ fixed(local!power,2) )
There's probably a more efficient way to do this, but here's at least an example that would work. I think you have to get your result into a state where it can easily be rounded, so I used a combination of log() and power():
a!localVariables( /* Original Variables */ local!interest: 10, local!months: 12, /* Original Expression */ local!base: 1+ local!interest, local!power: power(local!base, local!months), /* New Logic */ local!numberOfDigits:floor(log(local!power, 10)), local!decimalOnly: local!power / power(10, local!numberOfDigits), local!rounded: round(local!decimalOnly, 2), /* Final Result */ local!rounded * power(10, local!numberOfDigits) )