Last active
May 18, 2024 06:25
-
-
Save crazymonkyyy/7c182295828918bc161c53a9e66adccc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float lazyexo(byte i){ | |
if(i==-128){return 0;} | |
if(i<0){return 1/lazyexo(cast(byte)-i);} | |
enum table1=[0.0,1.0/5,1.0/3,1.0/2]; | |
enum table2=[1,2,5,10]; | |
float frac=table1[i%4]; | |
i/=4; | |
uint signif1=table2[i%4]; | |
i/=4; | |
signif1<<=i*4; | |
return signif1+signif1*frac; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment