Fixed abs check and +- root in t.

Sign of root for calculating t depends on sign of tau.

Error check in main loop not using square but fabs.