MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Cot

Function Cot

extern/ttmath/ttmath.h:655–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653 */
654 template<class ValueType>
655 ValueType Cot(const ValueType & x, ErrorCode * err = 0)
656 {
657 ValueType result = Sin(x, err);
658
659 if( err && *err != err_ok )
660 return result;
661
662 if( result.IsZero() )
663 {
664 if( err )
665 *err = err_improper_argument;
666
667 result.SetNan();
668
669 return result;
670 }
671
672 return Cos(x, err) / result;
673 }
674
675
676 /*!

Callers 1

CtgFunction · 0.85

Calls 3

SinFunction · 0.85
CosFunction · 0.85
IsZeroMethod · 0.80

Tested by

no test coverage detected