Python math.erf() Method

Math Methods : Print error function for different numbers

Definition and Usage

The math.erf() method returns the error function of a number.

This method accepts a value between - inf and + inf, and returns a value between - 1 to + 1.

Syntax

math.erf(x)

Parameter Values

Parameter Description
x Required. A number to find the error function of

Technical Details

Return Value: A float value, representing the error function of a number
Python Version: 3.2

More Examples

Example

Calculate the mathematical error function of the same number, positive and negative:

print (math.erf(1.28))
print (math.erf(-1.28))