4/4 * 1.5 = 1.5, which when rounded is 2. Or at least that's what I get from a quick review of rounding rules.
On Thursday, October 10, 2019 at 8:33:43 AM UTC-7, Surya wrote: > > Hello, > > The "Calc"-Plugin from https://mklauber.github.io/tiddly-mathjs/ does > work only half on my wiki and also on a freshly downloaded wiki. Both > Version 5.1.21. > It calculates correctly with simple numbers like <$calc>round({{!!amount}} > /2* 2)</$calc>. > But not with numbers like 0.5. For example, if I > write <$calc>round({{!!amount}} /4* 1.5)</$calc> (amount-field has "4"), > then the result should be 1.5. But the result is 2. > I tried it also with <$calc>round({{!!amount}} /4* 1,5) and with > <$calc>round({{!!amount}} /4* 1/2) and <$calc>round({{!!amount}} /4* 1 /2). > But nothing helped. > > I do not think, that the problem is in my wiki, because it is the same > behaviour in a freshly downloaded and totally empty TW (same version). > In another wiki of mine with an older version (5.1.14) it works > completely- also with numbers like 1.5. > > How to solve that problem?? > Thanks for your help! > Surya > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/08ca87ea-120c-4a42-b2d9-f1ee16ad67eb%40googlegroups.com.

