Page 1 of 1

Square Root & Log Calculator

Posted: Thu Feb 02, 2017 11:41 pm
by MBas
1. Square Root
Need a square root? Here is a simple solution. Since all signals are integers, there is just some rounding error. Just follow this instructions:

Input value must be set as signal I (placed in constant combinator). There also must be signal O set as 1 (it is important to keep this value constantly on 1). And then, just read the result from a green network as signal O
sr.png
sr.png (338.28 KiB) Viewed 9770 times
Description:
1. comb: I / O -> O
2. comb: O + 0 -> O
3. comb: O / 2 -> O

Code: Select all

H4sIAAAAAAAA/72U346qMBDGX8X0dstZwOOV6QPs1T6A2ZBKZ3USaEkZjIb03bcF93hQ2TSbKHdt58/X31dGmUVlSlktCtGDJiSEVvS9ljUIVhrdktSUlKbe
opZkLOONaX2U0aI/imTJTyLJHFdooRx2c+6zyJqq2MJeHtBY0X9iRWBD3RZ3Wlaip1Pj6x/QUicrxsd242Hyxpyv0WkSWZpy1AqOwreIyn2/5J4zc+fCltaj
Pi9iwzL2IXoLygsa7nwqUAXhaMsOKSwyFz5+5iAt0r4GwnKeRPpnFcXiUqvwhwrPoj7RtlTE4mkh5EaFByKmASsHReyVcdNR08X18smR9IJBl9XqmiXfsPxe
2iQwn0CvQWFXJ1D51taTb0wFU+Z5AJ7f17ezAHrS6u98q3h/H2/v+ILH/853eIJ1Nx5EmeVd5beQl7/kmj6Xa/o/15cHcb0aKPyntziHPJ8GztYY55XjWA6K
rmYlEtTf17jvifs3Z51bW6DO6kWxBq2+AJg07F4gBgAA
2. Log
Need a Log? Here is it (this one is little bit larger)

It works in a similar way - I signal is input, B signal is base of the logarithm and O signal is output.
l2.png
l2.png (381.55 KiB) Viewed 9759 times

Code: Select all

H4sIAAAAAAAA/92XUW+bMBDHv0rk15ktOEnTqvOk7W1SpX2AakIuXNqTwEbGVI0Q330QsgXSOhzNVHXLW+Lc+fj/zv8ziZmlJlbpLJIVaIcOoZBVpVUGksVG
F05pF8Qmu0OtnLGM56Zo/mW0rJ5ksOBbGSxrnqCFePer4E2UsyaN7uBBPaKxstpg6sC2eQu81yqVldvmTf5HtK5UKePddt1i8I3VTY5SO7ngqBN4kmHNSZHf
/0SK9T5U1HX7m9ZdeU0NtyxkP2VlIWnq2T3yNsKkrRttXKJrv7QbHpbWw6X2w/cKKYvuIQOHsVej+ccVSaRDqqhZTHBf7gZt4SL603fE5JybHKza7cY+MG5K
l5e0PF8ZVbOhTAMFxWBpdawgv2WCQKEvdQYJllkAaVOVbfTOTQpH3ShaocUhJIEYE7BjaMQYmn2eM7gU0MZS5W9KyHJl24Il+zwJXtcE+TbanYNoY00WoW6i
pbMlELmu/Gfhykfy3gJofxbhP1FigJnIbPGumX15e2Yn/GtJZ7b0gyFb3fw/cLrnyqz9+oZzusAnOp8+S8I3UXhC/7cju0fh09T2J8+bmj+X9II4uQUdzInz
MzSyCz/O8Xm16A4Lrf/C8FzPfN9jTk7qmZu/YZlL4pgbIh+COHWZuaJaxmtojnrAP3Rp8dPcqLTw4Rx1AiKZV7rw6A3kbBO+6Y+5sG+wwSR5f5ANdsLt7rLu
ZMN4l/Do/QwdZL+reFnR2vtu14994SzUvTe7awuutHoWXYNOfgFw3Uhdyw4AAA==

Re: Square Root & Log Calculator

Posted: Fri Feb 10, 2017 4:05 pm
by roberwt
Thanks!

Re: Square Root & Log Calculator

Posted: Tue Jun 27, 2017 2:59 pm
by Septimus ii
That's really clever, thanks

Re: Square Root & Log Calculator

Posted: Sun Jun 14, 2020 12:57 pm
by eViLegion
I know I'm a bit late to the party, but this is magnificently simple, and just what I needed. Lovely!

Re: Square Root & Log Calculator

Posted: Tue Jun 16, 2020 7:29 am
by ssilk
Very cool design.
To find this article (can search only words longer than 3): calculate logarithm, logarithmic, square root

Re: Square Root & Log Calculator

Posted: Sun Oct 18, 2020 5:34 am
by jade52blue
Oh! This is perfect, I'm going to use the Square Root for me CPU project

Re: Square Root & Log Calculator

Posted: Fri Nov 10, 2023 10:02 am
by Illiander42
How many ticks do these take to stabilise?