[erlang-questions] Frying pan bug
Fri Mar 2 15:42:34 CET 2012
I'm curious, I know that people are "right" when they say fix validate the inputs to factorial, but there are equations far less well known with similar degenerate cases where writing guards are inexpressible due to there being an infinite number of degenerate points. Not all curves are continuous even in the real world.
Would it be possible for Erlang's runtime to set a threshold, say looking at the thermal sensor on the board and error out if that "guard" is reached. You could do the same for disk I/O, network, or any other saturation condition.
This has been recently on my mind as we just did a poorman's thermal chamber test, and I've been writing a lot of Erlang that monitors the behavior of other apps under environmental stress, but have yet to solve the "how does the monitor that monitors itself know when to throw up the white flag and surrender?"
-=-=- dave@REDACTED -=-=-
On Mar 2, 2012, at 6:42 AM, Joe Armstrong <erlang@REDACTED> wrote:
> bug() -> p(0.3, 4, 11).
> c(N, M) -> fac(M) div (fac(N)*fac(M-N)).
> fac(0) -> 1;
> fac(N) -> N*fac(N-1).
> p(P, M, N) -> 1.0 - math:pow(1-P, N-M)*c(N, M).
> Running bug:bug() tries to turn my machine into a frying pan
> Should this be renamed frying_pan.erl ?
> Anybody else see this?
> erlang-questions mailing list
More information about the erlang-questions