/log_cap_vol.m

Log of hypersphere cap volume

Primary LanguageMATLAB

LOG_CAP_VOL Hyperspherical cap volume

Compute the log-volume of a height-d_h, radius-d_r cap on the unit ball in n_dim dimensions.

Input: n_dim = dimension, natural number
       d_r = radius of ball, a decimal in [0,inf)
       d_h = cap height, a decimal in [0,d_r]
Output: d_log_vol = log(volume of cap)