ee.Number.erf

  • The erf() function calculates the error function of a given number.

  • The input to erf() is a single number and it returns the corresponding error function value as a number.

  • The error function is a special function that is used in probability, statistics, and partial differential equations.

  • Examples are provided in JavaScript, Python using geemap, and Python in Colab environments demonstrating how to use the erf() function.

Computes the error function of the input.

UsageReturns
Number.erf()Number
ArgumentTypeDetails
this: inputNumberThe input value.

Examples

Code Editor (JavaScript)

print('Error function of -10', ee.Number(-10).erf());  // -1
print('Error function of -0.001', ee.Number(-0.001).erf());  // -0.001128378
print('Error function of 0', ee.Number(0).erf());  // 0
print('Error function of 0.001', ee.Number(0.001).erf());  // 0.001128378
print('Error function of 10', ee.Number(10).erf());  // 1

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

print('Error function of -10:', ee.Number(-10).erf().getInfo())  # -1
# -0.001128378
print('Error function of -0.001:', ee.Number(-0.001).erf().getInfo())
print('Error function of 0:', ee.Number(0).erf().getInfo())  # 0
# 0.001128378
print('Error function of 0.001:', ee.Number(0.001).erf().getInfo())
print('Error function of 10:', ee.Number(10).erf().getInfo())  # 1