David Peter 02e8faa39a Fix str_replace implementation 1 year ago
..
name_resolution_error 5760135223 Allow overwriting of constants/functions, closes #149 2 years ago
parse_error d515cde1ff Add support for prefix unary plus operator 2 years ago
runtime_error 1fd298a61b Add test for error(…) 2 years ago
typecheck_error dc1eeeb2ad Rename speed => velocity 2 years ago
acidity.nbt 21b8c86ca4 Fix tests 2 years ago
air_resistance.nbt dc1eeeb2ad Rename speed => velocity 2 years ago
assert_eq_success.nbt ae7be9b3e4 Rename project to Numbat 2 years ago
barometric_formula.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
binomial_coefficient.nbt 6b6d0de3c7 Improve binomial coeffient example using logical operators 1 year ago
body_mass_index.nbt e157883a81 Add examples to the documentation 2 years ago
booleans.nbt 77ec3377d3 Improve 'booleans' example 1 year ago
codata2018_consistency.nbt a559b88ac8 Add CODATA 2018 values of physics constants 1 year ago
consistency_others.nbt d43737c1e6 Use tropical years as 'year' unit 1 year ago
consistency_si.nbt 1645867220 Treat hundred, thousand, … as units 2 years ago
custom_dimensions.nbt 3c4d93af1b Shorthand notation for adding new dimensions, closes #42 2 years ago
datetime_human_tests.nbt c4f000aff5 Allow FFI targets in function references, conversion functions 1 year ago
datetime_tests.nbt f380f2c56a Rename parse_datetime => datetime 1 year ago
earth_mass.nbt eae4c53fd9 Initial support for multiline statements, see #112 2 years ago
euler_approximation.nbt af0f856958 Add euler approximation example 2 years ago
factorial.nbt b75bdb9c83 Support for recursive functions 2 years ago
flops.nbt 86451742fa Update FLOP example 2 years ago
gcd.nbt d94a3e3a90 Add two more recursive examples 2 years ago
generics.nbt ae7be9b3e4 Rename project to Numbat 2 years ago
hello_world.nbt e8a709684b Add strings to the language, use markup for printing 2 years ago
inter_dot_spacing.nbt 1b214e25b6 Add misc units 2 years ago
kinetic_energy.nbt dc1eeeb2ad Rename speed => velocity 2 years ago
medication_dosage.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
molarity.nbt e157883a81 Add examples to the documentation 2 years ago
musical_note_frequency.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
nested_function_calls.nbt ae7be9b3e4 Rename project to Numbat 2 years ago
numbat_syntax.nbt 96b722e127 Update syntax example to include logical operators 1 year ago
numerical_diff.nbt db3d95d055 Rename 1 year ago
paper_size.nbt 0750043454 Add paper size example 2 years ago
pendulum.nbt a2be63f82d Add short+long aliases for most phys. constants 2 years ago
pipe_flow_rate.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
population_growth.nbt f40f388a0a Add pop. growth example 2 years ago
prelude_tests.nbt 02e8faa39a Fix str_replace implementation 1 year ago
print.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
projectile_motion.nbt dc1eeeb2ad Rename speed => velocity 2 years ago
readme-demo.nbt 551700766a Add demo from README as an example 2 years ago
recipe.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
stopping_distance.nbt dc1eeeb2ad Rename speed => velocity 2 years ago
thermal_conductivity.nbt fda779e476 Add more physical dimensions 2 years ago
time_units.nbt ae7be9b3e4 Rename project to Numbat 2 years ago
unicode.nbt a2be63f82d Add short+long aliases for most phys. constants 2 years ago
what_if_11.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
what_if_158.nbt b3388c6979 Fix another occurrence typo 2 years ago
workhours.nbt d43737c1e6 Use tropical years as 'year' unit 1 year ago
xkcd_2585.nbt deda3fe26c Update examples in book 2 years ago
xkcd_2812.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 years ago
xkcd_681.nbt a2be63f82d Add short+long aliases for most phys. constants 2 years ago
xkcd_687.nbt deda3fe26c Update examples in book 2 years ago

readme-demo.nbt

use units::currencies

8 km / (1 h + 25 min)
140 € -> GBP
atan2(30 cm, 1 m) -> deg
let ω = 2π c / 660 nm
print("Energy of red photon: {ℏ ω -> eV}")