David Peter fedd0913fe Disallow base/derived dimension conflicts, closes #153 2 lat temu
..
name_resolution_error e1dafbecfb Revert "Allow overwriting of constants/functions, closes #149" 2 lat temu
parse_error 2731a37ef4 Improve reporting of parsing errors 2 lat temu
runtime_error 25001b5ed1 Better type checking for assert_eq 2 lat temu
typecheck_error fedd0913fe Disallow base/derived dimension conflicts, closes #153 2 lat temu
acidity.nbt 3c31c3f90e Add acidity example 2 lat temu
air_resistance.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
assert_eq_success.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
barometric_formula.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
binomial_coefficient.nbt d94a3e3a90 Add two more recursive examples 2 lat temu
body_mass_index.nbt e157883a81 Add examples to the documentation 2 lat temu
consistency_others.nbt fee8e90fbd Move assertions out of prelude 2 lat temu
consistency_si.nbt 8f945538fd Add consistency checks, fix two errors 2 lat temu
custom_dimensions.nbt 3c4d93af1b Shorthand notation for adding new dimensions, closes #42 2 lat temu
earth_mass.nbt eae4c53fd9 Initial support for multiline statements, see #112 2 lat temu
euler_approximation.nbt af0f856958 Add euler approximation example 2 lat temu
factorial.nbt b75bdb9c83 Support for recursive functions 2 lat temu
flops.nbt 86451742fa Update FLOP example 2 lat temu
format_time.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
gcd.nbt d94a3e3a90 Add two more recursive examples 2 lat temu
generics.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
hello_world.nbt e8a709684b Add strings to the language, use markup for printing 2 lat temu
inter_dot_spacing.nbt 1b214e25b6 Add misc units 2 lat temu
kinetic_energy.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
medication_dosage.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
molarity.nbt e157883a81 Add examples to the documentation 2 lat temu
musical_note_frequency.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
nested_function_calls.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
numbat_syntax.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
paper_size.nbt 0750043454 Add paper size example 2 lat temu
pendulum.nbt a2be63f82d Add short+long aliases for most phys. constants 2 lat temu
pipe_flow_rate.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
population_growth.nbt f40f388a0a Add pop. growth example 2 lat temu
prelude_tests.nbt 6ebf8c928a Add unit_of(…) and value_of(…) 2 lat temu
print.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
projectile_motion.nbt a2be63f82d Add short+long aliases for most phys. constants 2 lat temu
readme-demo.nbt 551700766a Add demo from README as an example 2 lat temu
recipe.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
stopping_distance.nbt eae4c53fd9 Initial support for multiline statements, see #112 2 lat temu
thermal_conductivity.nbt ef314b2e39 Allow newlines in function parameters 2 lat temu
time_units.nbt ae7be9b3e4 Rename project to Numbat 2 lat temu
unicode.nbt a2be63f82d Add short+long aliases for most phys. constants 2 lat temu
what_if_11.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
what_if_158.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
workhours.nbt e157883a81 Add examples to the documentation 2 lat temu
xkcd_2585.nbt deda3fe26c Update examples in book 2 lat temu
xkcd_2812.nbt c354c0995f String interpolation with arbitrary sub-expressions! 2 lat temu
xkcd_681.nbt a2be63f82d Add short+long aliases for most phys. constants 2 lat temu
xkcd_687.nbt deda3fe26c Update examples in book 2 lat temu

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}")