Sujet : Re: Problem For Physfitfreak (monospace font required)
De : ff (at) *nospam* linux.rocks (Farley Flud)
Groupes : comp.os.linux.advocacy sci.physicsSuivi-à : comp.os.linux.advocacyDate : 02. Nov 2024, 11:32:40
Autres entêtes
Organisation : UsenetExpress - www.usenetexpress.com
Message-ID : <pan$a57c0$4c040b81$8dcb6976$beba7258@linux.rocks>
References : 1 2
On Sat, 2 Nov 2024 00:15:11 -0500, Physfitfreak wrote:
In an absolute way? Disregarding unrelated limitations?
Then that base would be infinity :) Then any real and complex number
will be expressed in just one digit :)
>
Good guess.
This stuff is quite new to me. I just stumbled upon it when
doing some research on ternary (i.e. base 3) computers.
It's all explained here:
https://en.wikipedia.org/wiki/Optimal_radix_choiceThe "cost" of representing a number N in base b is (monospace
font required):
log(N)
b * floor(------ + 1)
log(b)
Letting N --> inf we get the asymptotic cost:
b
------
log(b)
Here is an image of the plot of this relation:
https://i.postimg.cc/CLwHyyzP/asymptotic-cost.pngThe minimum of this curve will give the lowest "cost"
of expression.
Take the derivative, set it equal to zero, and solve.
Using Maxima:
diff(b/log(b),b);
1 1
------ - -------
log(b) 2
log (b)
Set equal to zero and solve:
solve(diff(b/log(b),b) = 0, b);
[b = %e]
There it is! The most efficient number base is e, Euler's
constant.
But since irrational bases are not practical, we use the closest
integer base which is 3.
Thus, ternary (base 3) computers are the most efficient in
storing numbers.
-- Systemd: solving all the problems that you never knew you had.