lasarus_compotents/ECC/docs/examples/lineartologarithmic.txt

19 lines
529 B
Plaintext

{Assume the logathmic scale from 10 to 1000.
We are in the middle, i.e. "linear" 505.}
//See the code
aProportion := (505-10)/(1000-10) = 495/990 = 0.5
AMin := logn(10, 10) = 1
AMax := logn(10, 1000) = 3
Result := 10^(1+(3+1)*0.5) = 10^2 = 100
{... which is correct since 100 is in the middle of logarithmic scale 10 .. 1000.}
| | | | | | | ||| | | | | | | ||
10 100 (505) 1000