Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dheera
11 hours ago
|
parent
|
context
|
favorite
| on:
Should you normalize RGB values by 255 or 256?
Same point; divide by power of 2 is a fast subtraction operation in float world, while divide by 255 shits all over the whole float
help
yongjik
8 hours ago
[–]
If your input is an arbitrary float, you need to check for denormals (and maybe NaNs). You can do bitmasking trick to avoid conditional jumps but I'm skeptical you can do it faster than SIMD multiply instruction.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: