math mode, also prints binary representation now

This commit is contained in:
Alexander Mohr 2025-05-28 15:55:48 +02:00
parent 01802fe84e
commit 578594636a

View file

@ -232,7 +232,7 @@ fn calc(input: &str) -> String {
};
match eval_expr(&mut tokens) {
Ok(Value::Int(i)) => format!("{i} (0x{i:X})"),
Ok(Value::Int(i)) => format!("{i} (0x{i:X}) (0b{i:b})"),
Ok(Value::Float(f)) => format!("{f}"),
Err(e) => e,
}