WOLFRAM

Copy to clipboard.

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)Summary of the most common use cases

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

Out[2]=2
Out[3]=3

Scope  (2)Survey of the scope of standard use cases

System symbols with the NHoldRest attribute:

Out[1]=1

Use Part symbolically:

Out[1]=1

Using N does not affect the specified parts:

Out[2]=2

The expression works when x is substituted with a list:

Out[3]=3

Applications  (1)Sample problems that can be solved with this function

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:

Out[3]=3

Machine-number approximation:

Out[4]=4

47-digit approximation:

Out[5]=5

Properties & Relations  (2)Properties of the function, and connections to other functions

Subscript by default has the NHoldRest attribute:

Out[1]=1

This means that subscripts generally do not change under N:

Out[2]=2
Out[3]=3

HoldRest prevents evaluation while NHoldRest only prevents numerical evaluation:

Out[2]=2
Out[3]=3
Out[5]=5
Out[6]=6

You can prevent both by setting both attributes:

Out[8]=8
Out[9]=9
Wolfram Research (1996), NHoldRest, Wolfram Language function, https://reference.wolfram.com/language/ref/NHoldRest.html.
Copy to clipboard.
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.

Copy to clipboard.
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.

Copy to clipboard.
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

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

BibTeX

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

Copy to clipboard.
@misc{reference.wolfram_2025_nholdrest, author="Wolfram Research", title="{NHoldRest}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/NHoldRest.html}", note=[Accessed: 26-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_nholdrest, organization={Wolfram Research}, title={NHoldRest}, year={1996}, url={https://reference.wolfram.com/language/ref/NHoldRest.html}, note=[Accessed: 26-March-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2025_nholdrest, organization={Wolfram Research}, title={NHoldRest}, year={1996}, url={https://reference.wolfram.com/language/ref/NHoldRest.html}, note=[Accessed: 26-March-2025 ]}