6.4 Multivariate Functions

The units program supports some multivariate functions for performing calculations with units. The ‘hypot’ function computes the length of a hypotenuse given two sides. It works with any pair of values that have compatible dimensions.

You have: hypot(3 m, 4 m)
You want: 
        Definition: 5 m

You can compute wind chill, based on temperature and wind speed, or heat index, based on temperature and humidity, with humidity given as a fraction, e.g., 0.5 for a 50% relative humidity.

You have: windchill(tempF(28), 14 mph)
You want: tempF
        16.86826
You have: heatindex(tempC(40),0.5)
You want: tempC
        54.767952

Both wind chill and heat index return a value that is nominally a temperature, so you will want to convert it to Fahrenheit or Celsius as shown in order to get a meaningful numerical value.