fork/numbat
git clone https://git.julia.blue/fork/numbat
21b8c86
master
1# Compute the pH (acidity) of a solution based 2# on the activity of hydrogen ions 3# 4# https://en.wikipedia.org/wiki/PH 5 6fn pH_acidity(activity_hplus: Molarity) -> Scalar = 7 - log10(activity_hplus / (mol / L)) 8 9print(pH_acidity(5e-6 mol / L)) 10assert_eq(pH_acidity(5e-6 mol / L), 5.3, 0.1)