// ( a b -- bool ) public override void Execute(Interpreter interp) { ScalarItem b = (ScalarItem)interp.StackPop(); ScalarItem a = (ScalarItem)interp.StackPop(); interp.StackPush(new BoolItem(a.DoubleValue > b.DoubleValue)); }
// ( a b -- a^b ) public override void Execute(Interpreter interp) { ScalarItem b = (ScalarItem)interp.StackPop(); ScalarItem a = (ScalarItem)interp.StackPop(); interp.StackPush(new DoubleItem(Math.Pow(a.DoubleValue, b.DoubleValue))); }
// ( a -- sign ) public override void Execute(Interpreter interp) { ScalarItem a = (ScalarItem)interp.StackPop(); interp.StackPush(new IntItem(Math.Sign(a.IntValue))); }
public override int CompareTo(StackItem rhs) { ScalarItem r_val = (ScalarItem)rhs; return(DoubleValue.CompareTo(r_val.DoubleValue)); }