Hi Iona bass, it's 100% mathematical. I've been told
"Luthiers" figure it out by testing and moving the stops and nut.. Omg!!! That being said you are VERY correct, on the position of the c# and d on that bass, I remember once seeing it I had the guys pull the d stop, plug the holes and move...