Fix sign of tan special case and add more comments

This commit is contained in:
Markus Winter authored and Stephen Canon committed 2025-08-14 21:49:13 -04:00
1 parent 5ea4f613d3
commit e8940b786e
3 files changed
+178 -143

No files matched your search

@@ -33,10 +33,11 @@
// adapted from Kahan's 1986 paper "Branch Cuts for Complex Elementary
// Functions; or: Much Ado About Nothing's Sign Bit".
//
// As quaternions share the same goals and use adaptations of the elementary
// functions: If you make a modification to either of the following functions,
// you should almost surely make a parallel modification to the same elementary
// function of quaternions (See ElementaryFunctions.swift in QuaternionModule).
// Elementary functions of complex numbers have many similarities with
// elementary functions of quaternions and their definition in terms of real
// operations. Therefore, if you make a modification to one of the following
// functions, you should almost surely make a parallel modification to the same
// elementary function of quaternions.
import RealModule