Earlier quoted context omitted.
Perhaps the Sun engineer did indeed copy from UNIX to some mild degree The line between "inspired from" and "copied from" is a fine line indeed. When does a term stop being proprietary and enter the vernacular of a specific profession or of humanity at large? I lean rather liberal on this question, and I hope the law will too. OTOH, what is blatant theft is for your 'original' work to overlap 99%, in both names and s…
Look up the names of the functions in java.lang.Math. They are exactly the names and semantics used in the libm functions. Even down to the presence of the atan2 function which computes tan¯¹(y / x). (You could also point out that JavaScript literally lifts java.lang.Math and java.util.Date into JS code as well, down to Date.getYear returning the Gregorian year - 1900).
Second, unclear what the legal status of libm is. It appears to implement a standard, thus is legitimate to ask whether the set of implemented functions and their names are the original contribution of libm authors, or are derived from the standards. Generally, if one wants to implement a standard, one needs to acquire the rights to do so, usually in the form of a reasonable fee.
Third, if there are significant overlapping parts that are the creative work of libm authors, and they can establish a prior art claim, they are entitled to seek fair compensation from Sun / Oracle.
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.htm...
https://sourceware.org/newlib/libm.html
PS. Re: atan2, wikipedia: 'The function atan2(y,x) first appeared in the programming language Fortran (in IBM's implementation FORTRAN-IV in 1961). It was originally intended to return a correct and unambiguous value for the angle θ in converting from cartesian coordinates (x, y) to polar coordinates (r, θ).' Perfect example of a term that arguably migrates into the common technical vocabulary over decades.