[racket] gaussian function
2010/10/9 김태윤 <kty1104 at gmail.com>:
> hello I am finding gaussian function in scheme but I still have no solution
> gaussian function is evaluate such as 1.123 to 1 and 312.1312 to 312 etc.
> [...]
Hello,
the term "Gaussian function" usually indicates a certain kind of distribution
used frequently in statistics and physics. It can be implemented in its general
form by the following procedure definition:
(define ((gauss a b c) x)
(* a (exp (/ (sqr (/ (- x b) c)) -2))))
However, from your examples for function results I guess that you might
actually want a procedure rounding down to the next integer, which occasionally
goes by the name "Gaussian brackets", but is called "floor" in almost any
programming language, including Racket.
Ciao,
Thomas
--
When C++ is your hammer, every problem looks like your thumb.