public override object Do(KObject args, KEnvironment env, Continuation <KObject> cont) { CPara(args, 1); var inex = First(args) as KDouble; Check(inex); return(KFraction.fromDouble(inex.Value)); }
public static KFraction ToExact(KObject obj) { if (obj is KFraction) { return(obj as KFraction); } else { return(KFraction.fromDouble((obj as KDouble).Value)); } }