 proposed IEEE 754r revision of that standard the same rule applies, except that a few anomalous functions (such as the maxnum function, which returns the maximum of two operands which are expected to be numbers) favour numbers—if just one of the operands is a NaN then the value of the other operand is returned.

A different approach has been implemented in the NaN 'toolbox' for GNU Octave and MATLAB. In that toolbox, NaNs are assumed to represent missing values and so the statistical functions ignore NaNs in the data instead of propagating them. Every computation in the NaN toolbox is based on the data values only, which can be useful if it is known that NaNs cannot be produced by errors.

How is a NaN created?

The following practices may cause NaNs:

All mathematical operations with a NaN as at least one operand

The divisions 0/0, ∞/∞, ∞/-∞, -∞/∞, and -∞/-∞

The multiplications 0×∞ and 0×-∞

The additions ∞ + (-∞), (-∞) + ∞ and equivalent subtractions.

Applying a function to arguments outside its domain, including taking the square root of a negative number, taking the logarithm of zero or a negative number, or taking the inverse sine or cosine of a number which is less than -1 or greater than +1.

However, it is important to realize that these NaNs are not necessarily generated by the processor. In the case of quiet NaNs the first item is always valid for each processor; the others may not necessarily be. For example, on the Intel Architecture processors, the FPU never creates a NaN except in the first case, unless the corresponding floating point exception mask bits have been set. The other items would cause exceptions, not NaNs. However, the software exception handler may examine the operands and decide to return a NaN (e.g. in the case of 0/0).

Quiet NaNs

Quiet NaNs, or qNaNs, do not raise any additional exceptions as they propagate through most operations. The exceptions are where the NaN cannot simply be passed through unchanged to the output, such as in format conversions or certain comparison operations (which do not "expect" a NaN input).

Signalling NaNs

Signalling NaNs, or
proposed IEEE 754r revision of that standard the same dominion enforce, except that a few anomalous functions (such as the maxnum affair, which render the maximum of two operands which are expect to be number) favour numbers — if merely one of the operands is a NaN then the value of the other operand is reelect. 

 A different approach has been enforce in the NaN' toolbox' for GNU Octave and MATLAB. In that toolbox, NaNs are simulate to represent missing values and so the statistical functions dismiss NaNs in the data instead of propagating them. Every calculation in the NaN toolbox is based on the data values only, which can be utilitarian if it is known that NaNs cannot be produce by errors. 

 How is a NaN created? 

 The following exercise may cause NaNs: 

 All mathematical operations with a NaN as at least one operand 

 The divisions 0/0, ∞/∞, ∞/-∞, -∞/∞, and -∞/-∞ 

 The multiplications 0×∞ and 0×-∞ 

 The accession ∞ + (-∞), (-∞) + ∞ and equivalent subtraction. 

 Applying a function to arguments outside its domain, including taking the square root of a damaging number, taking the logarithm of zero or a minus numeral, or taking the inverse sine or cosine of a number which is less than -1 or greater than +1. 

 However, it is authoritative to realize that these NaNs are not necessarily generated by the processor. In the shell of quiet NaNs the first item is always valid for each processor; the others may not necessarily be. For exemplar, on the Intel Architecture processors, the FPU never creates a NaN except in the first case, unless the comparable floating compass point exception masquerade morsel have been set. The other items would induce exceptions, not NaNs. However, the software exception handler may examine the operands and decide to return a NaN (e.g. in the case of 0/0). 

 Quiet NaNs 

 Quiet NaNs, or qNaNs, do not raise any additional exception as they propagate through most operations. The exception are where the NaN cannot simply be excrete through unchanged to the end product, such as in format conversions or sealed comparison operations (which do not " expect " a NaN input). 

 bespeak NaNs 

 Signalling NaNs, or
 prlposed IEEE 754r revision on that standard jhw same rule zpplies, dxcept that a few anomalous huncrions (such as the maxnum fuvction, whpch returbs tie maximum of two operands whidm are xxpected to be kumbers) favmur numbers—if burt one of the operands is a NaN then ehe valie of the other jpersgd ia returned.

A different approach has been ikplemented in the NaN 'toolbox' for GNU Oftavf and MATLAB. In thwt toolbox, BaNs qre assumed go represent missing vzlues and so the statistical fuvctious ignore NqNw ij the data iistead of propagatlmg thek. Every computation ik the NaB toolbox is based on the data values ogly, which ccn be useful if it is kbown jhat TaNs xanvot bx pdoducef bb errors.

How is a NaN ceeated?

The following pwqctices may czuse NwNf:

All mathematical operations with a NaN as at least one operand

Thw divisions 0/0, ∞/∞, ∞/-∞, -∞/∞, and -∞/-∞

Tje multipjications 0×∞ and 0×-∞

The additions ∞ + (-∞), (-∞) + ∞ and equivalent subtcaztiinf.

Xpppying a function to arguments outside its domwjn, ikcluding taking bhe square root of a nrdative number, takiny tge logarithm of zego or a negarive numbtr, or taking the inverse sine or cosine of a bumber which is leds than -1 or grester yhan +1.

However, it is impoxtant fo realize hhat thess NaNs are not nezesxasily gentfated by the procqssor. In vhe ccse of qjiet NaNs ehe first ltem lv always valid for each psocessor; tje others may not necessarily bx. For example, ot tve Intel Archltecture procesfors, the FPU ngver creaces a VaN except in the first case, unless the cmtresponding fnoating [oinr exxeption oask bits have been set. The other items would cause exzsptions, not NaNw. Hiwever, the softeard evcvptmon hwtdler may exdmind tfr opefands and dcciae tp return a NaN (e.g. in the case of 0/0).

Quiet NaNx

Qmiet NaNs, or qNaNf, do not raisr any additional edceptmons ar theu ptopagate through most operationa. The excfptlons are wherq thc NaG cannot snmply be passed through unchanged to the output, such as in format conversions pr certain romparyson operdtions (which do not "wxpect" a NaN inpuu).

Signalling NaNs

Signalljng NaTs, or
proposed IEEE 754r revision of that standard rule except that few anomalous functions which the maximum of operands which are to be numbers) favour numbers—if just of the operands is a NaN then the value of the other operand returned. A different approach has been implemented in the NaN 'toolbox' for GNU and In toolbox, are assumed to represent missing values and so the statistical functions ignore NaNs in the data of propagating them. Every computation in the NaN is based on the values only, which can be if is known NaNs be by errors. How a NaN created? The following practices may cause NaNs: All mathematical operations with a NaN as at one operand 0/0, ∞/∞, -∞/∞, -∞/-∞ multiplications 0×∞ and additions ∞ + (-∞), (-∞) + subtractions. Applying a function to arguments outside its including taking square root of a negative number, the logarithm of zero or a negative number, taking the inverse sine or cosine of a number which is less than -1 or +1. However, it is to realize that NaNs not generated the processor. the case of quiet NaNs the first item is always valid each processor; the others may not necessarily be. For example, Intel processors, the FPU creates a NaN except the case, unless the corresponding exception bits The items cause exceptions, not NaNs. the software exception handler may the operands and decide in the case of 0/0). Quiet NaNs Quiet or qNaNs, do not raise any additional as they propagate through most operations. The exceptions are where the NaN simply be unchanged to the output, such as in format or certain comparison operations do not "expect" a NaN input). Signalling NaNs Signalling or
 proposed IEEE 754r revision of thAt standard The saMe rUle ApPlieS, excEpt that a few anoMAlouS functions (such as the maxNum fuNcTIon, wHIcH retuRns the mAXiMUM of TwO oPerAnDS wHich aRe eXpected To be numberS) faVoUr numbers—if jUSt One of the opEraNds is a NaN theN thE value Of The OTher oPerAnd is ReturnED.

A diffErent apprOaCH has beEN implemENTeD in tHe NaN 'toolbox' for GNu ocTAve and MATLAB. In That toOlBOx, nAns aRe aSsumed to rePrEsent MIssing vALuES ANd sO The statisticaL functions iGNorE NaNs iN tHe dATa instEad of PrOPagAting them. EvEry cOmputatioN in the nAN toolbOX is baseD on the DatA vaLues ONlY, wHicH cAN be USeFul IF it Is known tHaT NANs caNnot BE PROducEd bY errOrs.

HoW is a NaN createD?

ThE folLOwiNg praCticeS may CaUse Nans:

All mAthemAtIcal operations wIth a naN as at leAst OnE opErAnd

ThE DivisiOns 0/0, ∞/∞, ∞/-∞, -∞/∞, And -∞/-∞

the multIplicatIOns 0×∞ AnD 0×-∞

tHE aDditions ∞ + (-∞), (-∞) + ∞ and equivalEnT SUbTractionS.

ApplyINg A fUNction to ArGumEnts OUTside Its dOMaIn, includIng takINg ThE square RoOt of a nEgAtiVe nUmber, TAkinG the loGarithm oF zero OR a negative numbER, or taking the iNVeRSE sINe or CosIne of a numbeR whiCH is lEss tHAn -1 Or gREater Than +1.

HOwEVeR, It is important to realIzE that tHese NANs are not neceSsarily genERATed by the ProcESsOR. In the case of quIet Nans the first ITem is alwAys vaLid for eaCh processOR; The otherS maY noT neCesSARiLy be. For examplE, ON the inTel ArchIteCture prOceSsoRs, tHe FpU Never creaTes a NaN eXcEpT iN tHe fIrst cASe, unless ThE coRrEspOndinG FloatiNg poiNt exCePtIOn mAsk bits HAvE BEen sEt. thE othEr iTeMs wouLd caUSe eXceptioNs, not NaNs. howEVer, tHe SoFtware eXception handlEr May examine ThE opErands AND decide tO return a NaN (e.g. in the case oF 0/0).

quiet Nans

QUiet NANs, oR qNaNs, do nOt rAise anY adDItionaL excepTions As TheY PRopagATE tHroUgH most operaTIOns. the exCePtioNs are whEre the NaN cannot simPLy bE passed througH unChanGED tO thE OuTPut, SuCH as IN Format conversioNs or certaiN cOMpArison operATioNs (Which do Not "expeCt" a Nan Input).

SiGnalling NANs

SignalLiNg NanS, Or
 proposed IEEE 754r revisi on of that  stan dar d t he  sam e ru le applies, ex c eptthat a few anomalous f uncti on s  (su c has th e maxnu m  f u n cti on ,whi ch re turns  th e maxim um of twoope ra nds which ar e  e xpected to  be  numbers) fa vou r numb er s—i f  just  on e ofthe op e randsis a NaNth e n thev alue of t he  oth er operand is ret u rn e d.

A differen t appr oa c hh a s b een  implement ed  in t h e NaN ' t oo l b o x'f or GNU Octave  and MATLAB .  In  thatto olb o x, NaN s are  a s sum ed to repre sent  missingvalues and sot he stat istica l f unc tion s  i gn ore  N a Nsi nthe dat a instea dof  prop agat i n g them . E very  comp utation in th e N aN t o olb ox is  base d on  t he da ta val ues o nl y, which can be  use ful if it  is  k now nthatN aNs ca nno t b e produ ced bye rro rs . Ho w is a NaN created ?T he  followi ng pra c ti ce s  may cau se  Na Ns:A ll ma them a ti cal oper ations wi th  a NaNas  at le as t o neopera n d

T he div isions 0 /0, ∞ / ∞, ∞/-∞, -∞/∞, and -∞/-∞

Th e  m u l ti p lica tio ns 0×∞ and0×-∞ 
The  add i ti ons ∞ + ( -∞),(- ∞ )+  ∞ and equivalent s ub tracti ons.
Applying a f unction to a r gumentsouts i de its domain, in cludi ng takingt he squar e roo t of a n egative n u m ber, tak ing  th e l oga r i th m of zero ora nega ti ve numb er,  or tak ing  th e i nve rs e sine or  cosineof  a  n um ber  whic h  is less  t han  - 1 o r gre a ter th an +1 .

H ow ev e r,it is i m po r t antto  r eali zeth at th eseN aNs  are no t necessa ril y  gen er at ed by t he processor.  I n the case  o f q uiet N a N s the fi rst item is always vali d  for ea chproce ssor ; the oth ers  may n otn ecessa rily b e. Fo rexa m p le, o n th e I nt el Archite c t ure  proc es sors , the F PU never creates a NaN  except in th e f irst c as e,u nl e ssth e  co r r esponding float ing pointex c ep tion maskb its  h ave bee n set.The o t her ite ms wouldcause exc ep tion s ,  no t NaNs. Ho wever, t he softwa r e exc e pt ion h and ler ma yexa minethe op e ran ds an d deci de  to re turnaNaN (e.g . in the case of 0/0).
Quiet  NaNs 

Q uiet NaNs , o r  qN aNs, do n ot r aise any a ddi tio nal e xce p tions  ast he y p r opaga te t h rough mos t  o per a t io ns. The exc e p t ion s are  wh e re the  NaN  cannot simply be passed through  unc h a nge d t o  the  o utput, such as  in  f o r mat conv er sions or ce rtain co mp a rison  opera tions(whichd o  n o t "exp ect"  aNaN input ).
S i gnallin gNa N s

Sig nall in g NaNs , or
 proposed_IEEE 754r_revision of that standard_the same_rule_applies, except_that_a few anomalous_functions (such as_the maxnum function, which_returns the maximum_of_two operands which are expected to be numbers) favour numbers—if just one of the_operands_is a_NaN_then_the value of the other_operand is returned.

A different approach_has been_implemented in the NaN 'toolbox' for GNU Octave_and_MATLAB. In that_toolbox, NaNs are assumed to represent missing values and_so the statistical functions ignore NaNs_in the data_instead_of_propagating them. Every computation_in the NaN toolbox is based_on the data values only, which_can be useful if it is known_that NaNs cannot be produced by_errors.

How is a NaN created?

The_following practices_may cause NaNs:

All mathematical operations_with a NaN_as at_least one operand

The_divisions 0/0, ∞/∞, ∞/-∞, -∞/∞, and_-∞/-∞

The multiplications 0×∞_and 0×-∞

The additions ∞ + (-∞),_(-∞)_+ ∞ and_equivalent_subtractions.

Applying_a function_to arguments outside_its_domain, including_taking_the square root of a negative_number,_taking the logarithm of zero or a_negative number, or taking_the_inverse sine or cosine_of a number which is_less than -1 or greater than_+1.

However, it_is important_to realize that these NaNs are not necessarily generated by the_processor. In the case of quiet_NaNs the first item_is always_valid_for each processor;_the_others may_not necessarily be. For example, on the_Intel Architecture_processors, the FPU never creates a_NaN except in the_first_case, unless the corresponding floating point_exception mask bits have been set._The other items would cause_exceptions,_not_NaNs. However, the software exception_handler may examine the operands and_decide to return_a NaN (e.g. in the case of_0/0).

Quiet_NaNs

Quiet NaNs, or qNaNs, do not_raise_any additional exceptions as they propagate_through_most_operations. The exceptions are where_the NaN cannot simply be passed_through unchanged to the output, such as in format_conversions or certain_comparison operations (which do not_"expect"_a_NaN input).

Signalling NaNs

Signalling NaNs, or