General > General Technical Chat
"Veritasium" (YT) - "The Big Misconception About Electricity" ?
snarkysparky:
https://lpsa.swarthmore.edu/BackGround/phasor/phasor.html#:~:text=A%20sinusoidal%20signal%20f(t,a%20rotational%20velocity%20of%20%CF%89.
adx:
=SIN(3.1415926)
5.35898E-08
adx:
And the cesium clock.
TimFox:
--- Quote from: adx on April 13, 2022, 03:32:54 pm ---=SIN(3.1415926)
5.35898E-08
--- End quote ---
In a computed-tomography application, one of our software engineers used a value of pi defined to 7 decimal places instead of the compiler's function PI(). Unfortunately, he was off in the last decimal place. Computed tomography requires going around a circle exactly once. It was interesting how much error this small difference in pi caused to the resulting reconstructed image.
hamster_nz:
--- Quote from: TimFox on April 13, 2022, 04:14:00 pm ---
--- Quote from: adx on April 13, 2022, 03:32:54 pm ---=SIN(3.1415926)
5.35898E-08
--- End quote ---
In a computed-tomography application, one of our software engineers used a value of pi defined to 7 decimal places instead of the compiler's function PI(). Unfortunately, he was off in the last decimal place. Computed tomography requires going around a circle exactly once. It was interesting how much error this small difference in pi caused to the resulting reconstructed image.
--- End quote ---
Me: Goes away and quietly adds the following to the build pipeline:
--- Code: ---#!/bin/bash
count=`find src -type f -name '*.[ch]' | xargs grep -l -e "3[.]14" -e "1[.]57" | wc -l`
if [ "$count" != 0 ]
then
echo "Found a PI-like constant in these files:"
find src -type f -name '*.[ch]' | xargs grep -l -e "3[.]14" -e "1[.]57"
exit 3
else
exit 0
fi
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version