This file is indexed.

/usr/share/GNUstep/Documentation/Developer/Base/Reference/NSDecimalNumber.gsdoc is in gnustep-base-doc 1.25.1-2ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.4//EN" "http://www.gnustep.org/gsdoc-1_0_4.dtd">
<gsdoc base="NSDecimalNumber" up="Base">
  <head>
    <title>NSDecimalNumber class reference</title>
    <author name="Fred Kiefer">
      <email address="FredKiefer@gmx.de">
        FredKiefer@gmx.de
      </email>
    </author>
    <copy>2000 Free Software Foundation, Inc.</copy>
  </head>
  <body>
    <front><contents /></front>
    <chapter>
      <heading>
        Software documentation for the NSDecimalNumber class
      </heading>
      <class name="NSDecimalNumber" super="NSNumber" ovadd="10.0.0">
        <declared>Foundation/NSDecimalNumber.h</declared>
        <conform>NSDecimalNumberBehaviors</conform>
        <desc>
          <p>
            <strong>Class</strong> that implements a number of
            methods for performing decimal arithmetic to
            arbitrary precision. The behavior in terms of
            rounding choices and exception handling may be
            customized using the
            <ref type="class" id="NSDecimalNumberHandler">NSDecimalNumberHandler</ref>class, and defaults to <ref type="method" id="+defaultDecimalNumberHandler" class="NSDecimalNumberHandler">[NSDecimalNumberHandler +defaultDecimalNumberHandler]</ref>.</p>
            <p>
              Equivalent functionality to the
              <code>NSDecimalNumber</code> class may be accessed
              through functions, mostly named
              <code>NSDecimalXXX</code>, e.g.,
              <ref type="function" id="NSDecimalMin">
                NSDecimalMin()
              </ref>
              . Both the class and the functions use a structure
              called <code>NSDecimal</code>.
            </p>
            <p>
              Note that instances of <code>NSDecimalNumber</code>
              are immutable.
            </p>
        </desc>
        <ivariable type="NSDecimal" name="data" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Description forthcoming.</em>
          </desc>
        </ivariable>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>decimalNumberWithDecimal:</sel>
          <arg type="NSDecimal">decimal</arg>
          <desc>
            New instance with given value. Note an NSDecimal may be
            created using the function
            <ref type="function" id="NSDecimalFromString">
              NSDecimalFromString()
            </ref>
            .
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>decimalNumberWithMantissa:</sel>
          <arg type="unsigned long long">mantissa</arg>
          <sel>exponent:</sel>
          <arg type="short">exponent</arg>
          <sel>isNegative:</sel>
          <arg type="BOOL">isNegative</arg>
          <desc>
            New instance by component. Note that the precision of
            this initializer is limited.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>decimalNumberWithString:</sel>
          <arg type="NSString*">numericString</arg>
          <desc>
            New instance from string. Arbitrary precision is
            preserved, though calling one of the
            <code>decimalNumberBy...</code> methods will return
            a result constrained by the current
            <em><code>scale</code></em>. Number format is parsed
            according to current default locale.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>decimalNumberWithString:</sel>
          <arg type="NSString*">numericString</arg>
          <sel>locale:</sel>
          <arg type="NSDictionary*">locale</arg>
          <desc>
            New instance from string. Arbitrary precision is
            preserved, though calling one of the
            <code>decimalNumberBy...</code> methods will return
            a result constrained by the current
            <em><code>scale</code></em>. Number format is parsed
            according to given <var>locale</var>.
          </desc>
        </method>
        <method type="id&lt;NSDecimalNumberBehaviors&gt;" factory="yes" ovadd="10.0.0">
          <sel>defaultBehavior</sel>
          <desc>
            Returns the default rounding/precision/exception
            handling behavior, which is same as
            <ref type="method" id="+defaultDecimalNumberHandler" class="NSDecimalNumberHandler">[NSDecimalNumberHandler +defaultDecimalNumberHandler]</ref> unless it has been explicitly set otherwise.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>maximumDecimalNumber</sel>
          <desc>
            Return maximum positive value that can be
            represented.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>minimumDecimalNumber</sel>
          <desc>
            Return minimum negative value (<em>not</em> the
            smallest positive value) that can be represented.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>notANumber</sel>
          <desc>
            Return a fixed value representing an NaN.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>one</sel>
          <desc>
            Return a constant object with a value of one.
          </desc>
        </method>
        <method type="void" factory="yes" ovadd="10.0.0">
          <sel>setDefaultBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Sets the default rounding/precision/exception handling
            <var>behavior</var> to the given <var>behavior</var>.
            If this is not called, <var>behavior</var> defaults to
            <ref type="method" id="+defaultDecimalNumberHandler" class="NSDecimalNumberHandler">[NSDecimalNumberHandler +defaultDecimalNumberHandler]</ref>.
          </desc>
        </method>
        <method type="NSDecimalNumber*" factory="yes" ovadd="10.0.0">
          <sel>zero</sel>
          <desc>
            Return a constant object with a value of zero.
          </desc>
        </method>
        <method type="NSComparisonResult" ovadd="10.0.0">
          <sel>compare:</sel>
          <arg type="NSNumber*">decimalNumber</arg>
          <desc>
            Compares with other number, returning less,
            greater, or equal.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByAdding:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <desc>
            Adds self to <var>decimalNumber</var> and returns new
            result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByAdding:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Adds self to <var>decimalNumber</var> and returns new
            result, using given <var>behavior</var> for
            rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByDividingBy:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <desc>
            Divides self by <var>decimalNumber</var> and
            returns new result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByDividingBy:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Divides self by <var>decimalNumber</var> and
            returns new result, using given <var>behavior</var>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByMultiplyingBy:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <desc>
            Multiplies self by <var>decimalNumber</var> and
            returns new result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByMultiplyingBy:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Multiplies self by <var>decimalNumber</var> and
            returns new result, using given <var>behavior</var>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByMultiplyingByPowerOf10:</sel>
          <arg type="short">power</arg>
          <desc>
            Multiplies self by given <var>power</var> of 10
            and returns new result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByMultiplyingByPowerOf10:</sel>
          <arg type="short">power</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Multiplies self by given <var>power</var> of 10
            and returns new result, using given <var>behavior</var>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByRaisingToPower:</sel>
          <arg type="NSUInteger">power</arg>
          <desc>
            Raises self to given positive integer
            <var>power</var> and returns new result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByRaisingToPower:</sel>
          <arg type="NSUInteger">power</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Raises self to given positive integer
            <var>power</var> and returns new result, using given
            <var>behavior</var> for rounding/precision/error
            handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberByRoundingAccordingToBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Returns rounded version of underlying decimal.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberBySubtracting:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <desc>
            Subtracts <var>decimalNumber</var> from self and
            returns new result, using
            <ref type="method" id="+defaultBehavior">
              +defaultBehavior
            </ref>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>decimalNumberBySubtracting:</sel>
          <arg type="NSDecimalNumber*">decimalNumber</arg>
          <sel>withBehavior:</sel>
          <arg type="id&lt;NSDecimalNumberBehaviors&gt;">behavior</arg>
          <desc>
            Subtracts <var>decimalNumber</var> from self and
            returns new result, using given <var>behavior</var>
            for rounding/precision/error handling.
          </desc>
        </method>
        <method type="NSDecimal" ovadd="10.0.0">
          <sel>decimalValue</sel>
          <desc>
            Return underlying value as an <code>NSDecimal</code>
            structure.
          </desc>
        </method>
        <method type="NSString*" ovadd="10.0.0">
          <sel>descriptionWithLocale:</sel>
          <arg type="id">locale</arg>
          <desc>
            Returns string version of number formatted
            according to <var>locale</var>.
          </desc>
        </method>
        <method type="double" ovadd="10.0.0">
          <sel>doubleValue</sel>
          <desc>
            Returns underlying value as a
            <code><strong>double</strong></code>, which may be
            an approximation if precision greater than the default
            of 38.
          </desc>
        </method>
        <method type="id" ovadd="10.0.0">
          <sel>initWithDecimal:</sel>
          <arg type="NSDecimal">decimal</arg>
          <desc>
            Initialize with given value. Note an NSDecimal
            may be created using the function
            <ref type="function" id="NSDecimalFromString">
              NSDecimalFromString()
            </ref>
            .
          </desc>
        </method>
        <method type="id" ovadd="10.0.0">
          <sel>initWithMantissa:</sel>
          <arg type="unsigned long long">mantissa</arg>
          <sel>exponent:</sel>
          <arg type="short">exponent</arg>
          <sel>isNegative:</sel>
          <arg type="BOOL">flag</arg>
          <desc>
            Initialize by component. Note that the precision
            of this initializer is limited.
          </desc>
        </method>
        <method type="id" ovadd="10.0.0">
          <sel>initWithString:</sel>
          <arg type="NSString*">numberValue</arg>
          <desc>
            Initialize from string. Arbitrary precision is
            preserved, though calling one of the
            <code>decimalNumberBy...</code> methods will return
            a result constrained by the current
            <em><code>scale</code></em>. Number format is parsed
            according to current default locale.
          </desc>
        </method>
        <method type="id" ovadd="10.0.0">
          <sel>initWithString:</sel>
          <arg type="NSString*">numberValue</arg>
          <sel>locale:</sel>
          <arg type="NSDictionary*">locale</arg>
          <desc>
            Initialize from string. Arbitrary precision is
            preserved, though calling one of the
            <code>decimalNumberBy...</code> methods will return
            a result constrained by the current
            <em><code>scale</code></em>. Number format is parsed
            according to given <var>locale</var>.
          </desc>
        </method>
        <method type="const char*" ovadd="10.0.0">
          <sel>objCType</sel>
          <desc>
            Returns the Objective-C type (
            <code>@encode(...)</code> compatible) of the data
            contained <code>NSDecimalNumber</code>, which is
            by convention "d" (for <strong>double</strong>), even
            though this is not strictly accurate.
          </desc>
        </method>
      </class>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the NSDecimalNumberHandler
        class
      </heading>
      <class name="NSDecimalNumberHandler" super="NSObject" ovadd="10.0.0">
        <declared>Foundation/NSDecimalNumber.h</declared>
        <conform>NSDecimalNumberBehaviors</conform>
        <desc>
          A utility class adopting
          <ref type="protocol" id="(NSDecimalNumberBehaviors)">&lt;NSDecimalNumberBehaviors&gt;</ref>
            protocol. Can be used to control
            <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
              rounding and exception-handling behavior, by
              passing an instance as an argument to any
              <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
                method ending with <code>...Behavior:</code>.
        </desc>
        <ivariable type="BOOL" name="_raiseOnDivideByZero" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <ivariable type="BOOL" name="_raiseOnExactness" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <ivariable type="BOOL" name="_raiseOnOverflow" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <ivariable type="BOOL" name="_raiseOnUnderflow" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <ivariable type="NSRoundingMode" name="_roundingMode" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <ivariable type="short int" name="_scale" validity="protected" ovadd="10.0.0">
          <desc>
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          </desc>
        </ivariable>
        <method type="id" factory="yes" ovadd="10.0.0">
          <sel>decimalNumberHandlerWithRoundingMode:</sel>
          <arg type="NSRoundingMode">roundingMode</arg>
          <sel>scale:</sel>
          <arg type="short">scale</arg>
          <sel>raiseOnExactness:</sel>
          <arg type="BOOL">raiseOnExactness</arg>
          <sel>raiseOnOverflow:</sel>
          <arg type="BOOL">raiseOnOverflow</arg>
          <sel>raiseOnUnderflow:</sel>
          <arg type="BOOL">raiseOnUnderflow</arg>
          <sel>raiseOnDivideByZero:</sel>
          <arg type="BOOL">raiseOnDivideByZero</arg>
          <desc>
            Constructor setting all behavior. (For more
            precise control over error handling, create your
            own class implementing the
            <ref type="protocol" id="(NSDecimalNumberBehaviors)">&lt;NSDecimalNumberBehaviors&gt;</ref>
              protocol.)
          </desc>
        </method>
        <method type="id" factory="yes" ovadd="10.0.0">
          <sel>defaultDecimalNumberHandler</sel>
          <desc>
            Provides an instance implementing the default
            behavior for the
            <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
              class. 38 decimal digits, rounded to closest
              return value (<code>NSRoundPlain</code>).
              Exceptions raised on overflow, underflow, and
              divide by zero.
          </desc>
        </method>
        <method type="id" ovadd="10.0.0">
          <sel>initWithRoundingMode:</sel>
          <arg type="NSRoundingMode">roundingMode</arg>
          <sel>scale:</sel>
          <arg type="short">scale</arg>
          <sel>raiseOnExactness:</sel>
          <arg type="BOOL">raiseOnExactness</arg>
          <sel>raiseOnOverflow:</sel>
          <arg type="BOOL">raiseOnOverflow</arg>
          <sel>raiseOnUnderflow:</sel>
          <arg type="BOOL">raiseOnUnderflow</arg>
          <sel>raiseOnDivideByZero:</sel>
          <arg type="BOOL">raiseOnDivideByZero</arg>
          <desc>
            Initializer setting all behavior. (For more
            precise control over error handling, create your
            own class implementing the
            <ref type="protocol" id="(NSDecimalNumberBehaviors)">&lt;NSDecimalNumberBehaviors&gt;</ref>
              protocol.)
          </desc>
        </method>
      </class>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the
        NSNumber(NSDecimalNumber) category
      </heading>
      <category name="NSDecimalNumber" class="NSNumber" ovadd="10.0.0">
        <declared>Foundation/NSDecimalNumber.h</declared>
        <desc>
          Interface for obtaining an NSDecimalNumber value
          from an ordinary NSNumber.
        </desc>
        <method type="NSDecimal" ovadd="10.0.0">
          <sel>decimalValue</sel>
          <desc>
            Obtaining an NSDecimalNumber version of an
            ordinary NSNumber. <br /> Returns an NSDecimal
            representation of the number. Float and
            <strong>double</strong> values may not be
            converted exactly
          </desc>
        </method>
      </category>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the
        NSDecimalNumberBehaviors protocol
      </heading>
      <protocol name="NSDecimalNumberBehaviors" ovadd="10.0.0">
        <declared>Foundation/NSDecimalNumber.h</declared>
        <desc>
          This protocol encapsulates information about how an
          <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
            should round and process exceptions. Usually you can
            just create objects of the
            <ref type="class" id="NSDecimalNumberHandler">NSDecimalNumberHandler</ref>
              class, which implements this protocol, but if you
              don't want to use that class you can create your
              own implementing it.
        </desc>
        <method type="NSDecimalNumber*" ovadd="10.0.0">
          <sel>exceptionDuringOperation:</sel>
          <arg type="SEL">method</arg>
          <sel>error:</sel>
          <arg type="NSCalculationError">error</arg>
          <sel>leftOperand:</sel>
          <arg type="NSDecimalNumber*">leftOperand</arg>
          <sel>rightOperand:</sel>
          <arg type="NSDecimalNumber*">rightOperand</arg>
          <desc>
            <p>
              Specifies behavior when, in the course of
              applying <var>method</var> to
              <var>leftOperand</var> and <var>rightOperand</var>,
              an
              <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>instance encounters given <var>error</var>.</p>
              <p>
                <var>error</var> has four possible constant
                values:
              </p>
              <deflist>
                <term>
                  <code>NSCalculationLossOfPrecision</code>
                </term>
                <desc>
                  The number can't be represented in 38 significant
                  digits.
                </desc>
                <term><code>NSCalculationOverflow</code></term>
                <desc>
                  The number is too large to represent.
                </desc>
                <term><code>NSCalculationUnderflow</code></term>
                <desc>
                  The number is too small to represent.
                </desc>
                <term>
                  <code>NSCalculationDivideByZero</code>
                </term>
                <desc>The caller tried to divide by 0.</desc>
              </deflist>
              <p>
                Behavior on <var>error</var> can be one of the
                following:
              </p>
              <list>
                <item>Raise an exception.</item>
                <item>
                  Return <code>nil</code>. The calling
                  <var>method</var> will return its value as
                  though no <var>error</var> had occurred. If
                  <var>error</var> is
                  <code>NSCalculationLossOfPrecision</code>,
                  <var>method</var> will return an imprecise
                  value, constrained to 38 significant digits.
                  If <var>error</var> is
                  <code>NSCalculationUnderflow</code> or
                  <code>NSCalculationOverflow</code>,
                  <var>method</var> will return
                  <code>NSDecimalNumber</code> 's
                  <code>notANumber</code>. You shouldn't return
                  <code>nil</code> if <var>error</var> is
                  <code>NSDivideByZero</code>.
                </item>
                <item>
                  Correct the <var>error</var> and return a
                  valid <code>NSDecimalNumber</code>. The calling
                  <var>method</var> will use this as its own
                  return value.
                </item>
              </list>
          </desc>
        </method>
        <method type="NSRoundingMode" ovadd="10.0.0">
          <sel>roundingMode</sel>
          <desc>
            Specifies how
            <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
              's <code>decimalNumberBy...</code> methods round their
              return values. This should be set to one of the
              following constants:
              <deflist>
                <term><code>NSRoundDown</code></term>
                <desc>Always round down.</desc>
                <term><code>NSRoundUp</code></term>
                <desc>Always round up.</desc>
                <term><code>NSRoundPlain</code></term>
                <desc>
                  Round to the closest possible return value.
                  Halfway (e.g..5) rounds up for positive
                  numbers, down for negative (towards larger
                  absolute value).
                </desc>
                <term><code>NSRoundBankers</code></term>
                <desc>
                  Round to the closest possible return value, but
                  halfway (e.g..5) rounds towards possibility
                  whose last digit is even.
                </desc>
              </deflist>
          </desc>
        </method>
        <method type="short" ovadd="10.0.0">
          <sel>scale</sel>
          <desc>
            Specifies the precision of the values returned by
            <ref type="class" id="NSDecimalNumber">NSDecimalNumber</ref>
              's <code>decimalNumberBy...</code> methods, in terms
              of the number of digits allowed after the decimal
              point. This can be negative, implying that the
              precision should be, e.g., 100's, 1000's, etc..
              For unlimited precision, set to
              <code>NSDecimalNoScale</code>.
          </desc>
        </method>
      </protocol>
    </chapter>
  </body>
</gsdoc>