Illustration for Nix Trigonometric Math Library from Ground Zero

Nix Trigonometric Math Library from Ground Zero

List of Nix Math Library from Ground Zero series posts: Nix Trigonometric Math Library from Ground Zero (current post) Nix Logarithmic Math Library from Ground Zero (Cover image from: Wikipedia - Trigonometry ) Why I wanted to calculate the network latency between all my VPS nodes, and add the latency into the configuration file of Bird BGP daemon, so the network packets are forwarded through the lowest latency route. However, I have 17 nodes as of today, and I didn't want to manually run a ping command between each pair. So I came up with a solution: I can mark the latitudes and longitudes of the physical locations of my nodes, calculate the physical distance, and divide that by half the light speed to get the approximate latencies. I randomly sampled a few node pairs,...