25 lines · 289 B · C
RawDownload
#include <math.h>#include "_npe.h" doublelog2(double x){	static double ln2c = 0.0;	if(x == 0)		return -hugeD;	if(x < 0 || isNaN(x))		return NaN();	if(ln2c == 0.0)		ln2c = log(2.0); 	return log(x)/ln2c;} floatlog2f(float x){	if(x == 0)		return -hugeF; 	return log2(x);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t