NumericFunction

NumericFunction

is an attribute that can be assigned to a symbol f to indicate that f[arg1,arg2,] should be considered a numeric quantity whenever all the argi are numeric quantities.

Details

Examples

open allclose all

Basic Examples  (1)

Log has the NumericFunction attribute:

When Log has an argument that is a number, constant, or numeric, the result is numeric:

In most cases when NumericQ[expr] gives True, then N[expr] yields an explicit number:

Scope  (2)

Define f to be a numeric function:

If you have not assigned f to yield numerical values, then NumericQ gives misleading results:

Assign f to evaluate for arguments that are approximate numbers:

The system symbols that are numeric functions:

Applications  (1)

Define a function that can represent an exact value:

Assign N[f[a]] to give the derivative with respect to a of the solution of an ODE at :

Assign f for approximate numbers:

f[1] does not evaluate but represents a number:

It will work with any precision (within reasonable limits!):

A plot of the function:

Wolfram Research (1996), NumericFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/NumericFunction.html.

Text

Wolfram Research (1996), NumericFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/NumericFunction.html.

BibTeX

@misc{reference.wolfram_2020_numericfunction, author="Wolfram Research", title="{NumericFunction}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/NumericFunction.html}", note=[Accessed: 23-January-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_numericfunction, organization={Wolfram Research}, title={NumericFunction}, year={1996}, url={https://reference.wolfram.com/language/ref/NumericFunction.html}, note=[Accessed: 23-January-2021 ]}

CMS

Wolfram Language. 1996. "NumericFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NumericFunction.html.

APA

Wolfram Language. (1996). NumericFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumericFunction.html