Returns the Real part of numbers near the real line

massage(z, tol = 1e-10)

Arguments

z

vector of complex numbers to be massaged

tol

Tolerance

Author

Robin K. S. Hankin

Examples

massage(1+1i)
#> [1] 1+1i
massage(1+1e-11i)
#> [1] 1

massage(c(1,1+1e-11i,1+10i))
#> [1] 1+ 0i 1+ 0i 1+10i