fork/numbat

git clone https://git.julia.blue/fork/numbat

David PeterFix tests21b8c86

v1.7.0
291 B10 linesraw
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)