Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
caf
on Aug 11, 2016
|
parent
|
context
|
favorite
| on:
Type Punning Functions in C
The reordering thing is bunk anyway, because if you just define the reordering function:
double IntPowerOfDouble(int power, double base) { return DoubleToTheInt(base, power); }
...then gcc with -O1 will optimise IntPowerOfDouble to a plain "call DoubleToTheInt", and with -O2 will completely inline DoubleToTheInt into it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: