Skip to content

Introduce support for Infinities and Transcendentals. Document supported SymPy features.

Frederik Hennig requested to merge fhennig/more-sympy into v2.0-dev

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 of PsFunction to represent typed special constants (pi, e, infinities)
  • Add freeze support for sp.pi, sp.e and sp.oo
  • Extend typifier; treat PsConstantFunction like PsConstants in contextual typing
  • Extend vectorizer; broadcast PsConstantFunctions
  • Add support for emitting special constants to CPU/x86 and CUDA/HIP targets

Documentation

  • Explain design and interactions of PsConstant, PsFunction and PsLiteral in the backend guide
  • Add a list of supported SymPy features to the API docs
Edited by Frederik Hennig

Merge request reports