bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use of math.h / libmath discouraged?


From: Brian Vandenberg
Subject: use of math.h / libmath discouraged?
Date: Tue, 24 Jul 2018 16:04:57 -0600

Greetings,

In a plugin I wrote I created a function with the following form / function:

$ cat makefile
ASDF := something
$(timeit 100, ${ASDF})
$ make
makefile:2 Time taken: mean: 232, stdev: 81.719765

make: *** No targets.  Stop.


... where "timeit" is implemented using the online mean/variance estimate from Knuth's TAoCP.  It evaluates the 2nd argument a number of times equal to what the 1st argument evaluates to then spits out a mean / std deviation across those runs.


I want to contribute this function back to the make project, however there's a problem if it gets accepted: calculating the standard deviation requires calling sqrt from math.h / libmath.

Am I safe to assume that adding a dependence on math.h / libmath isn't an option?

-brian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]