function navy(sex, height, waist, neck, hip = null) {
const inch = 2.54;
height = height / inch;
waist = waist / inch;
neck = neck / inch;
hip = hip / inch;
let bf = "";
if (sex == "male") {
bf = 86.01 * Math.log10(waist - neck) - 70.041 * Math.log10(height) + 36.76;
} else if (sex == "female") {
bf =
163.205 * Math.log10(waist + hip - neck) -
97.684 * Math.log10(height) -
78.387;
} else {
bf = "error: sex was not male or female";
}
return bf;
}