func EqualWithinAbsOrRel(a, b complex128, absTol, relTol float64) bool {
	return EqualWithinAbs(a, b, absTol) || EqualWithinRel(a, b, relTol)
}
EqualWithinAbsOrRel returns true when a and b are equal to within
the absolute or relative tolerances. See EqualWithinAbs and
EqualWithinRel for details.
package cscalar
import (
	"math"
	"math/cmplx"
	"gonum.org/v1/gonum/floats/scalar"
)
func EqualWithinAbs(a, b complex128, tol float64) bool {
	return a == b || cmplx.Abs(a-b) <= tol
}
const minNormalFloat64 = 0x1p-1022
func EqualWithinRel(a, b complex128, tol float64) bool {
	if a == b {
		return true
	}
	delta := cmplx.Abs(a - b)
	if delta <= minNormalFloat64 {
		return delta <= tol*minNormalFloat64
	}
	return delta/math.Max(cmplx.Abs(a), cmplx.Abs(b)) <= tol
}