By mistake I've passed 45.0f to gb_mat4_perspective and everything was looking fine.
But when I've enabled GB_MATH_NO_MATH_H suddenly nothing worked anymore.
Apparently tanf does some wrap arounds inside, and current emulation doesn't do that.
After some googling I found that original code is probably coming from some old DSP code ( for example this ) and then idlib math included it with some improvements here.
Not a problem for me, but would be nice to fix it at some point 👍