This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.
exp_f128
Implementation of f128 exp and exp2 based on:
"Table-Driven Implementation of the Exponential Function in IEEE Floating-Point Arithmetic"
ACM Transactions on Mathematical Software (TOMS), Volume 15, Issue 2 pp. 144-157
and
"Table-driven implementation of the Expm1 function in IEEE floating-point arithmetic"
ACM Transactions on Mathematical Software (TOMS), Volume 18, Issue 2 pp. 211-222
Both by Ping Tak Peter Tang.
Adapted by Christophe Delage to work with 128 bit floats and with base 2 and 10.
Accuracy tested on 100 million uniformly distributed random values:
exp:
when result is normal: <= 0.5 ulp: 99.83%, worst case: 0.512
when result is subnormal: <= 0.5 ulp: 99.80%, worst case: 0.628
exp2:
when result is normal: <= 0.5 ulp: 99.82%, worst case: 0.514
when result is subnormal: <= 0.5 ulp: 99.56%, worst case: 0.752