How to use 'python trigonometric functions' in Python

Every line of 'python trigonometric functions' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
157def _evalf_(self, x, parent=None):
158 """
159 EXAMPLES::
160
161 sage: n(sec(pi/4),100)
162 1.4142135623730950488016887242
163 sage: float(sec(pi/4))
164 1.4142135623730951
165 """
166 if parent is float:
167 return 1/math.cos(x)
168 return (1 / x.cos())

Related snippets