NHoldRest

NHoldRest

is an attribute which specifies that all but the first argument to a function should not be affected by N.

Examples

open allclose all

Basic Examples  (1)

Prevent N from affecting all but the first argument of a function:

Scope  (2)

System symbols with the NHoldRest attribute:

Use Part symbolically:

Using N does not affect the specified parts:

The expression works when x is substituted with a list:

Applications  (1)

Define a function that represents the real-valued root for positive and positive integer :

Prevent its second argument from being converted to real using NHoldRest:

An exact representation of the cube root of 2:

Machine-number approximation:

47-digit approximation:

Properties & Relations  (2)

Subscript by default has the NHoldRest attribute:

This means that subscripts generally do not change under N:

HoldRest prevents evaluation while NHoldRest only prevents numerical evaluation:

You can prevent both by setting both attributes:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_nholdrest, author="Wolfram Research", title="{NHoldRest}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/NHoldRest.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_nholdrest, organization={Wolfram Research}, title={NHoldRest}, year={1996}, url={https://reference.wolfram.com/language/ref/NHoldRest.html}, note=[Accessed: 21-December-2024 ]}