Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
lib
libc
musl
src
math
logbf.c
pretty
plain
permalink
blame
history
•
10 lines
•
130 B
1
#include <math.h>
2
3
float logbf(float x)
4
{
5
	if (!isfinite(x))
6
		return x * x;
7
	if (x == 0)
8
		return -1/(x*x);
9
	return ilogbf(x);
10
}