Introduce support for Infinities and Transcendentals. Document supported SymPy features.
This MR introduces parsing and code generation for pi, e, and positive/negative infinity. Furthermore, the documentation on constants and functions in the backend, as well as supported SymPy features is extended.
Infinities and Transcendentals
- Introduce
PsConstantFunction
subclass ofPsFunction
to represent typed special constants (pi, e, infinities) - Add freeze support for
sp.pi
,sp.e
andsp.oo
- Extend typifier; treat
PsConstantFunction
likePsConstant
s in contextual typing - Extend vectorizer; broadcast
PsConstantFunction
s - Add support for emitting special constants to CPU/x86 and CUDA/HIP targets
Documentation
- Explain design and interactions of
PsConstant
,PsFunction
andPsLiteral
in the backend guide - Add a list of supported SymPy features to the API docs
Edited by Frederik Hennig