Skip to content

Conversation

vishnoi246
Copy link

@vishnoi246 vishnoi246 commented Aug 6, 2025

Summary

Added practical examples for special math functions demonstrating:

  • Standard use cases (integer/fractional inputs)
  • Edge cases (negative values and poles)
  • Error conditions
  • Mathematical relationships between functions

Changes Made

  1. Added examples showing math.gamma() behavior:
    >>> math.gamma(5)      # factorial(n-1) relationship
    24.0
    >>> math.gamma(0)      # pole behavior
    Traceback (most recent call last):
        ...
    ValueError: math domain error

math.lgamma(5) # log-gamma of factorial(4)
3.1780538303479458
math.lgamma(0) # pole behavior
Traceback (most recent call last):
...
ValueError: math domain error


📚 Documentation preview 📚: https://cpython-previews--137489.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Aug 6, 2025

The following commit authors need to sign the Contributor License Agreement:

CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Aug 6, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Aug 6, 2025
@vishnoi246 vishnoi246 closed this Aug 6, 2025
@vishnoi246 vishnoi246 deleted the patch-2 branch August 6, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant