Replaced with TRBP, not working yet
switch to doubles for better numerical stability (for now)