3 ms·
Beautiful. I'd just looked up float_t, and realized that typedef'ing it to double was almost certainly a 'tell', but I still failed to spot the failure to incl
by nkurz 11y ago
Beautiful. I'd just looked up float_t, and realized that typedef'ing it to double was almost certainly a 'tell', but I still failed to spot the failure to include the header.
I presumed it was simply going to try to slip in a 'float' for a 'float_t' and hope it wasn't noticed, although it seemed unlikely to be a winning strategy.
One other thing that seemed odd was the continued use 'double' after the typedef. I wonder if there's a way to make it work where all the usages are replaced by 'float_t'.
- scatters 11y ago> I wonder if there's a way to make it work where all the usages are replaced by 'float_t'. Yes, in fact you don't have to change anything else. The trick is that on x86-64 float is promoted to double for argument passing, so the mismatch in the return type on spectral_contrast has no effect.