Lines Matching refs:code
32 @item Arbitrarily large floating point numbers (@code{BigFloat}) in base 2 using the IEEE 754 seman…
34 @item Arbitrarily large floating point numbers (@code{BigDecimal}) in base 10 based on the proposal…
37 …code{math} mode: arbitrarily large integers and floating point numbers are available by default. T…
38 remainder. @code{^} is an alias to the power operator
39 (@code{**}). @code{^^} is used as the exclusive or operator.
43 The extensions are independent from each other except the @code{math}
51 looking at the @code{Symbol.operatorSet} property in the objects. The
58 @item @code{with operators from} is not supported. Operator overloading is always enabled.
60 …ispatch is not based on a static @code{[[OperatorSet]]} field in all instances. Instead, a dynamic…
62 @item @code{Operators.create(...dictionaries)} is used to create a new OperatorSet object. The @cod…
64 @item @code{[]} cannot be overloaded.
66 @item In math mode, the BigInt division and power operators can be overloaded with @code{Operators.…
74 @table @code
77 Return @math{trunc(a/b)}. @code{b = 0} raises a RangeError
81 Return @math{\lfloor a/b \rfloor}. @code{b = 0} raises a RangeError
85 Return @math{\lceil a/b \rceil}. @code{b = 0} raises a RangeError
90 division). @code{b = 0} raises a RangeError exception.
121 This extension adds the @code{BigFloat} primitive type. The
122 @code{BigFloat} type represents floating point numbers in base 2
125 special values @code{NaN}, @code{+/-Infinity}, @code{+0} and @code{-0}
133 environment (@code{BigFloatEnv} object). The status flags of the
140 @code{RNDN} (``round to nearest with ties to even'')@footnote{The
145 @code{BigFloatEnv.prec}. The number of exponent bits of the global
146 environment is @code{BigFloatEnv.expBits}. The global environment
147 subnormal flag is set to @code{true}.
149 For example, @code{prec = 53} and @code{ expBits = 11} exactly give
151 default precision is @code{prec = 113} and @code{ expBits = 15} (IEEE
155 when calling a function (see @code{BigFloatEnv.setPrec}). Hence a
166 @code{typeof} applied on a @code{BigFloat} returns @code{bigfloat}.
172 equal when using the strict comparison operators (e.g. @code{0.0 ===
177 BigFloat literals are floating point numbers with a trailing @code{l}
187 @subsection @code{BigFloat} function
189 The @code{BigFloat} function cannot be invoked as a constructor. When
195 @code{BigFloat} properties:
197 @table @code
208 Getter. Return the minimum, maximum and epsilon @code{BigFloat} values
209 (same definition as the corresponding @code{Number} constants).
212 Round the floating point number @code{a} according to the floating
213 point environment @code{e} or the global environment if @code{e} is
217 Parse the string @code{a} as a floating point number in radix
218 @code{radix}. The radix is 0 (default) or from 2 to 36. The radix 0
220 result is rounded according to the floating point environment @code{e}
221 or the global environment if @code{e} is undefined.
224 Return true if @code{a} is a finite bigfloat.
227 Return true if @code{a} is a NaN bigfloat.
234 point number @code{a} according to the floating point environment
235 @code{e} or the global environment if @code{e} is undefined. If
236 @code{e} is specified, the floating point status flags are updated.
250 to the nearest integer with ties to even (remainder). @code{e} is an
254 Square root. Return a rounded floating point number. @code{e} is an
268 number. @code{e} is an optional floating point environment.
272 @subsection @code{BigFloat.prototype}
276 @table @code
278 Return the bigfloat primitive value corresponding to @code{this}.
296 The exponent letter is @code{e} for base 10, @code{p} for bases 2, 8,
297 16 with a binary exponent and @code{@@} for the other bases.
302 Same semantics as the corresponding @code{Number} functions with
303 BigFloats. There is no limit on the accepted precision @code{p}. The
309 @subsection @code{BigFloatEnv} constructor
311 The @code{BigFloatEnv([p, [,rndMode]]} constructor cannot be invoked as a
324 …can only be set by the floating point operations. They can be reset with @code{BigFloatEnv.prototy…
328 @code{new BigFloatEnv([p, [,rndMode]]} creates a new floating point
332 @code{p}, the number of exponent bits is set to @code{expBitsMax} and the
333 subnormal flags is set to @code{false}. If @code{rndMode} is
334 @code{undefined}, the rounding mode is set to @code{RNDN}.
336 @code{BigFloatEnv} properties:
338 @table @code
342 environment. The initial value is @code{113}.
347 @code{15}.
350 Set the precision of the global floating point environment to @code{p}
351 and the exponent size to @code{e} then call the function
352 @code{f}. Then the Float precision and exponent size are reset to
353 their precious value and the return value of @code{f} is returned (or
354 an exception is raised if @code{f} raised an exception). If @code{e}
355 is @code{undefined} it is set to @code{BigFloatEnv.expBitsMax}.
397 @code{BigFloatEnv.prototype} properties:
399 @table @code
413 @code{expBits = expBitsMax}.
429 This extension adds the @code{BigDecimal} primitive type. The
430 @code{BigDecimal} type represents floating point numbers in base
434 The @code{BigDecimal} floating point numbers are always normalized and
435 finite. There is no concept of @code{-0}, @code{Infinity} or
436 @code{NaN}. By default, all the computations are done with infinite
443 @table @code
457 precision (use @code{BigDecimal.div} to specify the rounding).
484 @code{m} suffix.
488 @subsection The @code{BigDecimal} function.
490 It returns @code{0m} if no parameter is provided. Otherwise the first
495 @subsection Properties of the @code{BigDecimal} object
497 @table @code
507 point result according to the rounding object @code{e}. If the
511 For @code{div}, a @code{RangeError} exception is thrown in case of
515 For @code{sqrt}, a range error is thrown if @code{a} is less than
519 @code{roundingMode} is a string specifying the rounding mode
520 (@code{"floor"}, @code{"ceiling"}, @code{"down"}, @code{"up"},
521 @code{"half-even"}, @code{"half-up"}). Either
522 @code{maximumSignificantDigits} or @code{maximumFractionDigits} must
529 @subsection Properties of the @code{BigDecimal.prototype} object
531 @table @code
533 Return the bigdecimal primitive value corresponding to @code{this}.
536 Convert @code{this} to a string with infinite precision in base 10.
541 Convert the BigDecimal @code{this} to string with the specified
542 precision @code{p}. There is no limit on the accepted precision
543 @code{p}. The rounding mode can be optionally
544 specified. @code{toPrecision} outputs either in decimal fixed notation
545 or in decimal exponential notation with a @code{p} digits of
546 precision. @code{toExponential} outputs in decimal exponential
547 notation with @code{p} digits after the decimal point. @code{toFixed}
548 outputs in decimal notation with @code{p} digits after the decimal
555 A new @emph{math mode} is enabled with the @code{"use math"}
567 …h a decimal point or an exponent) are @code{BigFloat} by default (i.e. a @code{l} suffix is implie…
569 …code{n} suffix are @code{BigInt} if their value cannot be represented as a safe integer. A safe in…
575 @item The @code{^} operator is an alias to the power operator (@code{**}).
577 …item The power operator (both @code{^} and @code{**}) grammar is modified so that @code{-2^2} is a…
579 @item The logical xor operator is still available with the @code{^^} operator.
581 @item The modulo operator (@code{%}) returns the Euclidian remainder (always positive) instead of t…
583 @item The integer division operator can be overloaded with @code{Operators.updateBigIntOperators(di…
585 @item The integer power operator with a non zero negative exponent can be overloaded with @code{Ope…