henesyinit from p9fce6d0435 years agoHistory
73 lines · 909 B · C
RawDownload
#include <u.h>#include <libc.h> #include "hoc.h" double	errcheck(double, char*); doubleLog(double x){	return errcheck(log(x), "log");}doubleLog10(double x){	return errcheck(log10(x), "log10");} doubleSqrt(double x){	return errcheck(sqrt(x), "sqrt");} doubleExp(double x){	return errcheck(exp(x), "exp");} doubleAsin(double x){	return errcheck(asin(x), "asin");} doubleAcos(double x){	return errcheck(acos(x), "acos");} doubleSinh(double x){	return errcheck(sinh(x), "sinh");}doubleCosh(double x){	return errcheck(cosh(x), "cosh");}doublePow(double x, double y){	return errcheck(pow(x,y), "exponentiation");} doubleinteger(double x){	return (double)(long)x;} doubleerrcheck(double d, char* s)	/* check result of library call */{	if(isNaN(d))		execerror(s, "argument out of domain");	if(isInf(d, 0))		execerror(s, "result out of range");	return d;}

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