Skip to content

Instantly share code, notes, and snippets.

View Geogouz's full-sized avatar
💭
When not coding? Bouldering, swimming and listening to great music!!

Dimitris Xenakis Geogouz

💭
When not coding? Bouldering, swimming and listening to great music!!
View GitHub Profile
@Alrecenk
Alrecenk / fastexp.java
Last active August 12, 2022 23:05
Very fast accurate approximation to Math.exp in java using floating point bit hacks.
/* fast floating point exp function
* must initialize table with buildexptable before using
Based on
A Fast, Compact Approximation of the Exponential Function
Nicol N. Schraudolph 1999
Adapted to single precision to improve speed and added adjustment table to improve accuracy.
Alrecenk 2014