Archibald wrote:
I was expecting anything that compiles for an Arduino should compile for the ESP32. I still think that should be the case (unless impossible due to hardware differences).
This is a reasonable expectation, but behind the scenes AVR Arduinos are using avrlibc and ESP32 is using newlib. So there will be some small differences, mostly things which are missing from the much more resource constrained AVRs. We can't easily remove these things, because we implement a superset of the AVR-based Arduino chips' functionality (for things like WiFi and RTOS interactions, among others.)
According to Wikipedia (
here) in a standard library for C it should be tgamma, not gamma.
The man page for gamma(3) on Linux helpfully tells us:
CONFORMING TO
Because of historical variations in behavior across systems, this function is not specified in any recent standard. It was documented in SVID 2.
SVID is the System V Interface Definiton. So we can blame the original Unix for this behaviour!