tan is a simple divide, so I think in this case it's probably better to define it in C.
sscanf() can actually scan INF, but it needs POSIX to work in the crosstests. You'll need something like [1].
[1] https://gitlab.winehq.org/zfigura/vkd3d/-/commit/ec79b5aa5682dd6f486738bd50a...