I'm trying to put together a (clunky) way of using CSA so that if I use smaller denominations of coins and I haven't got enough the larger denominations are used to make the difference. For example if I have -22sp the macro will automatically minus 3 gp from my total and and leave me with 8sp, if that makes sense. This is part of what I have so far: !modattr --name @{character_name} --evaluate --sp|("%sp%" < 0) ? -10*floor(%sp%/10): 0 which will add the lowest multiple of ten to get the sp back to positive. However, when I try to run this I hit an error that Floor is not defined (same with ceil). Has anyone else encountered this or am I just making an obvious mistake? Any fix or workaround, or even better method of doing the same thing would be appreciated.