I\'d like to approximate the ex function.
Is it possible to do so using multiple splines type based approach? i.e between x1
This is not the smooth spline interpolation you requested but its computationally efficient:
float expf_fast(float x) { union { float f; int i; } y; y.i = (int)(x * 0xB5645F + 0x3F7893F5); return (y.f); }
Plot Output