more buttons + %d

This commit is contained in:
zeroflag 2022-12-15 12:25:29 +01:00
parent 43b718d1a7
commit 40e8a28595
2 changed files with 8 additions and 2 deletions

View file

@ -100,3 +100,4 @@
:java.util.Calendar/DAY_OF_MONTH jvm-static-var
:java.util.Calendar/getInstance jvm-call-static
:get/i jvm-call-method ;
: d% ( n1 n2 -- n3 ) swap dup abs >r - r> / 100 * ;

View file

@ -400,7 +400,12 @@ public class FclTest {
assertEquals(10, evalPop("100 10 percent").doubleValue(), 0.001);
assertEquals(100, evalPop("100 100 percent").doubleValue(), 0.001);
assertEquals(130.686, evalPop("4356.2 3 percent").doubleValue(), 0.001);
assertEquals(0.16482, evalPop("1.23 13.4 percent").doubleValue(), 0.001);
assertEquals(10, evalPop("100 110 d%").doubleValue(), 0.001);
assertEquals(-10, evalPop("100 90 d%").doubleValue(), 0.001);
assertEquals(181.026, evalPop("23.4 65.76 d%").doubleValue(), 0.001);
assertEquals(-181.026, evalPop("-23.4 -65.76 d%").doubleValue(), 0.001);
assertEquals(-381.026, evalPop("23.4 -65.76 d%").doubleValue(), 0.001);
assertEquals(381.026, evalPop("-23.4 65.76 d%").doubleValue(), 0.001);
}
@Test