161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file Defines the Decimal for ArkTS. Decimal support arbitrary precision decimal operation.
1861847f8eSopenharmony_ci * @kit ArkTS
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * The type uesd to set rounding
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
2561847f8eSopenharmony_ci * @atomicservice
2661847f8eSopenharmony_ci * @since 12
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_citype Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
2961847f8eSopenharmony_ci
3061847f8eSopenharmony_ci/**
3161847f8eSopenharmony_ci * The type uesd to set modulo
3261847f8eSopenharmony_ci *
3361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
3461847f8eSopenharmony_ci * @atomicservice
3561847f8eSopenharmony_ci * @since 12
3661847f8eSopenharmony_ci */
3761847f8eSopenharmony_citype Modulo = Rounding | 9;
3861847f8eSopenharmony_ci
3961847f8eSopenharmony_ci/**
4061847f8eSopenharmony_ci * The type uesd to denote decimal value
4161847f8eSopenharmony_ci *
4261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
4361847f8eSopenharmony_ci * @atomicservice
4461847f8eSopenharmony_ci * @since 12
4561847f8eSopenharmony_ci */
4661847f8eSopenharmony_citype Value = string | number | Decimal;
4761847f8eSopenharmony_ci
4861847f8eSopenharmony_ci/**
4961847f8eSopenharmony_ci * Provides configuration for decimal.
5061847f8eSopenharmony_ci *
5161847f8eSopenharmony_ci * @interface DecimalConfig
5261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
5361847f8eSopenharmony_ci * @atomicservice
5461847f8eSopenharmony_ci * @since 12
5561847f8eSopenharmony_ci */
5661847f8eSopenharmony_ciinterface DecimalConfig {
5761847f8eSopenharmony_ci  /**
5861847f8eSopenharmony_ci   * The maximum number of significant digits of the result of an operation.
5961847f8eSopenharmony_ci   * Default value: 20
6061847f8eSopenharmony_ci   *
6161847f8eSopenharmony_ci   * @type { number } integer, 1 to 1e+9 inclusive
6261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
6361847f8eSopenharmony_ci   * @atomicservice
6461847f8eSopenharmony_ci   * @since 12
6561847f8eSopenharmony_ci   */
6661847f8eSopenharmony_ci  precision?: number;
6761847f8eSopenharmony_ci  /**
6861847f8eSopenharmony_ci   * The default rounding mode used when rounding the result of an operation to precision significant digits,
6961847f8eSopenharmony_ci   * and when rounding the return value of the round, toBinary, toDecimalPlaces, toExponential, toFixed,
7061847f8eSopenharmony_ci   * toHexadecimal, toNearest, toOctal, toPrecision and toSignificantDigits methods.
7161847f8eSopenharmony_ci   * Default value: 4 (ROUND_HALF_UP)
7261847f8eSopenharmony_ci   *
7361847f8eSopenharmony_ci   * @type { number } integer, integer, 0 to 8 inclusive
7461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
7561847f8eSopenharmony_ci   * @atomicservice
7661847f8eSopenharmony_ci   * @since 12
7761847f8eSopenharmony_ci   */
7861847f8eSopenharmony_ci  rounding?: Rounding;
7961847f8eSopenharmony_ci  /**
8061847f8eSopenharmony_ci   * The negative exponent value at and below which toString returns exponential notation.
8161847f8eSopenharmony_ci   * Default value: -7
8261847f8eSopenharmony_ci   *
8361847f8eSopenharmony_ci   * @type { number } integer, -9e15 to 0 inclusive
8461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
8561847f8eSopenharmony_ci   * @atomicservice
8661847f8eSopenharmony_ci   * @since 12
8761847f8eSopenharmony_ci   */
8861847f8eSopenharmony_ci  toExpNeg?: number;
8961847f8eSopenharmony_ci  /**
9061847f8eSopenharmony_ci   * The positive exponent value at and above which toString returns exponential notation.
9161847f8eSopenharmony_ci   * Default value: 20
9261847f8eSopenharmony_ci   *
9361847f8eSopenharmony_ci   * @type { number } integer, 0 to 9e15 inclusive
9461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
9561847f8eSopenharmony_ci   * @atomicservice
9661847f8eSopenharmony_ci   * @since 12
9761847f8eSopenharmony_ci   */
9861847f8eSopenharmony_ci  toExpPos?: number;
9961847f8eSopenharmony_ci  /**
10061847f8eSopenharmony_ci   * The negative exponent limit, i.e. the exponent value below which underflow to zero occurs.
10161847f8eSopenharmony_ci   * Default value: -9e15
10261847f8eSopenharmony_ci   *
10361847f8eSopenharmony_ci   * @type { number } integer, -9e15 to 0 inclusive
10461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
10561847f8eSopenharmony_ci   * @atomicservice
10661847f8eSopenharmony_ci   * @since 12
10761847f8eSopenharmony_ci   */
10861847f8eSopenharmony_ci  minE?: number;
10961847f8eSopenharmony_ci  /**
11061847f8eSopenharmony_ci   * The positive exponent limit, i.e. the exponent value above which overflow to Infinity occurs.
11161847f8eSopenharmony_ci   * Default value: 9e15
11261847f8eSopenharmony_ci   *
11361847f8eSopenharmony_ci   * @type { number } integer, 0 to 9e15 inclusive
11461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
11561847f8eSopenharmony_ci   * @atomicservice
11661847f8eSopenharmony_ci   * @since 12
11761847f8eSopenharmony_ci   */
11861847f8eSopenharmony_ci  maxE?: number;
11961847f8eSopenharmony_ci  /**
12061847f8eSopenharmony_ci   * The value that determines whether cryptographically-secure pseudo-random number generation is used.
12161847f8eSopenharmony_ci   * Default value: false
12261847f8eSopenharmony_ci   *
12361847f8eSopenharmony_ci   * @type { boolean }
12461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
12561847f8eSopenharmony_ci   * @atomicservice
12661847f8eSopenharmony_ci   * @since 12
12761847f8eSopenharmony_ci   */
12861847f8eSopenharmony_ci  crypto?: boolean;
12961847f8eSopenharmony_ci  /**
13061847f8eSopenharmony_ci   * The modulo mode used when calculating the modulus: a mod n.
13161847f8eSopenharmony_ci   * Default value: 1 (ROUND_DOWN)
13261847f8eSopenharmony_ci   *
13361847f8eSopenharmony_ci   * @type { number } integer, 0 to 9 inclusive
13461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
13561847f8eSopenharmony_ci   * @atomicservice
13661847f8eSopenharmony_ci   * @since 12
13761847f8eSopenharmony_ci   */
13861847f8eSopenharmony_ci  modulo?: Modulo;
13961847f8eSopenharmony_ci  /**
14061847f8eSopenharmony_ci   * If object has a 'defaults' property with value true then the new constructor will use the default configuration.
14161847f8eSopenharmony_ci   * Default value: false
14261847f8eSopenharmony_ci   *
14361847f8eSopenharmony_ci   * @type { boolean }
14461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
14561847f8eSopenharmony_ci   * @atomicservice
14661847f8eSopenharmony_ci   * @since 12
14761847f8eSopenharmony_ci   */
14861847f8eSopenharmony_ci  defaults?: boolean;
14961847f8eSopenharmony_ci}
15061847f8eSopenharmony_ci
15161847f8eSopenharmony_ci/**
15261847f8eSopenharmony_ci * An arbitrary-precision Decimal type
15361847f8eSopenharmony_ci *
15461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
15561847f8eSopenharmony_ci * @atomicservice
15661847f8eSopenharmony_ci * @since 12
15761847f8eSopenharmony_ci */
15861847f8eSopenharmony_cideclare class Decimal {
15961847f8eSopenharmony_ci  /**
16061847f8eSopenharmony_ci   * The numbers of decimal digits.
16161847f8eSopenharmony_ci   *
16261847f8eSopenharmony_ci   * @type { number[] }
16361847f8eSopenharmony_ci   * @readonly
16461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
16561847f8eSopenharmony_ci   * @atomicservice
16661847f8eSopenharmony_ci   * @since 12
16761847f8eSopenharmony_ci   */
16861847f8eSopenharmony_ci  readonly d: number[];
16961847f8eSopenharmony_ci
17061847f8eSopenharmony_ci  /**
17161847f8eSopenharmony_ci   * The number of decimal exponent.
17261847f8eSopenharmony_ci   *
17361847f8eSopenharmony_ci   * @type { number }
17461847f8eSopenharmony_ci   * @readonly
17561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
17661847f8eSopenharmony_ci   * @atomicservice
17761847f8eSopenharmony_ci   * @since 12
17861847f8eSopenharmony_ci   */
17961847f8eSopenharmony_ci  readonly e: number;
18061847f8eSopenharmony_ci
18161847f8eSopenharmony_ci  /**
18261847f8eSopenharmony_ci   * The number of decimal sign.
18361847f8eSopenharmony_ci   *
18461847f8eSopenharmony_ci   * @type { number }
18561847f8eSopenharmony_ci   * @readonly
18661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
18761847f8eSopenharmony_ci   * @atomicservice
18861847f8eSopenharmony_ci   * @since 12
18961847f8eSopenharmony_ci   */
19061847f8eSopenharmony_ci  readonly s: number;
19161847f8eSopenharmony_ci
19261847f8eSopenharmony_ci  /**
19361847f8eSopenharmony_ci   * Return a new Decimal whose value is the absolute value of this Decimal.
19461847f8eSopenharmony_ci   *
19561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
19661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
19761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
19861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
19961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
20061847f8eSopenharmony_ci   * @atomicservice
20161847f8eSopenharmony_ci   * @since 12
20261847f8eSopenharmony_ci   */
20361847f8eSopenharmony_ci  constructor(n: Value);
20461847f8eSopenharmony_ci
20561847f8eSopenharmony_ci  /**
20661847f8eSopenharmony_ci   * Return a new Decimal whose value is the absolute value of this Decimal.
20761847f8eSopenharmony_ci   *
20861847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
20961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
21061847f8eSopenharmony_ci   * @atomicservice
21161847f8eSopenharmony_ci   * @since 12
21261847f8eSopenharmony_ci   */
21361847f8eSopenharmony_ci  abs(): Decimal;
21461847f8eSopenharmony_ci
21561847f8eSopenharmony_ci  /**
21661847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
21761847f8eSopenharmony_ci   * direction of negative Infinity.
21861847f8eSopenharmony_ci   *
21961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
22061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
22161847f8eSopenharmony_ci   * @atomicservice
22261847f8eSopenharmony_ci   * @since 12
22361847f8eSopenharmony_ci   */
22461847f8eSopenharmony_ci  floor(): Decimal;
22561847f8eSopenharmony_ci
22661847f8eSopenharmony_ci  /**
22761847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
22861847f8eSopenharmony_ci   * direction of positive Infinity.
22961847f8eSopenharmony_ci   *
23061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
23161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
23261847f8eSopenharmony_ci   * @atomicservice
23361847f8eSopenharmony_ci   * @since 12
23461847f8eSopenharmony_ci   */
23561847f8eSopenharmony_ci  ceil(): Decimal;
23661847f8eSopenharmony_ci
23761847f8eSopenharmony_ci  /**
23861847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.
23961847f8eSopenharmony_ci   *
24061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
24161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
24261847f8eSopenharmony_ci   * @atomicservice
24361847f8eSopenharmony_ci   * @since 12
24461847f8eSopenharmony_ci   */
24561847f8eSopenharmony_ci  trunc(): Decimal;
24661847f8eSopenharmony_ci
24761847f8eSopenharmony_ci  /**
24861847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal clamped to the range
24961847f8eSopenharmony_ci   * delineated by `min` and `max`.
25061847f8eSopenharmony_ci   *
25161847f8eSopenharmony_ci   * @param { Value } min {number | string | Decimal}
25261847f8eSopenharmony_ci   * @param { Value } max {number | string | Decimal}
25361847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
25461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
25561847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
25661847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
25761847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `min` is out of range.
25861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
25961847f8eSopenharmony_ci   * @atomicservice
26061847f8eSopenharmony_ci   * @since 12
26161847f8eSopenharmony_ci   */
26261847f8eSopenharmony_ci  clamp(min: Value, max: Value): Decimal;
26361847f8eSopenharmony_ci
26461847f8eSopenharmony_ci  /**
26561847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal plus `n`, rounded to `precision`
26661847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
26761847f8eSopenharmony_ci   *
26861847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
26961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
27061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
27161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
27261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
27361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
27461847f8eSopenharmony_ci   * @atomicservice
27561847f8eSopenharmony_ci   * @since 12
27661847f8eSopenharmony_ci   */
27761847f8eSopenharmony_ci  add(n: Value): Decimal;
27861847f8eSopenharmony_ci
27961847f8eSopenharmony_ci  /**
28061847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal minus `n`, rounded to `precision`
28161847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
28261847f8eSopenharmony_ci   *
28361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
28461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
28561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
28661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
28761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
28861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
28961847f8eSopenharmony_ci   * @atomicservice
29061847f8eSopenharmony_ci   * @since 12
29161847f8eSopenharmony_ci   */
29261847f8eSopenharmony_ci  sub(n: Value): Decimal;
29361847f8eSopenharmony_ci
29461847f8eSopenharmony_ci  /**
29561847f8eSopenharmony_ci   * Return a new Decimal whose value is this Decimal times `n`, rounded to `precision` significant
29661847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
29761847f8eSopenharmony_ci   *
29861847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
29961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
30061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
30161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
30261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
30361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
30461847f8eSopenharmony_ci   * @atomicservice
30561847f8eSopenharmony_ci   * @since 12
30661847f8eSopenharmony_ci   */
30761847f8eSopenharmony_ci  mul(n: Value): Decimal;
30861847f8eSopenharmony_ci
30961847f8eSopenharmony_ci  /**
31061847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal divided by `n`, rounded to
31161847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
31261847f8eSopenharmony_ci   *
31361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
31461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
31561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
31661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
31761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
31861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
31961847f8eSopenharmony_ci   * @atomicservice
32061847f8eSopenharmony_ci   * @since 12
32161847f8eSopenharmony_ci   */
32261847f8eSopenharmony_ci  div(n: Value): Decimal;
32361847f8eSopenharmony_ci
32461847f8eSopenharmony_ci  /**
32561847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal modulo `n`, rounded to
32661847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
32761847f8eSopenharmony_ci   *
32861847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
32961847f8eSopenharmony_ci   * @returns { Decimal }the Decimal type
33061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
33161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
33261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
33361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
33461847f8eSopenharmony_ci   * @atomicservice
33561847f8eSopenharmony_ci   * @since 12
33661847f8eSopenharmony_ci   */
33761847f8eSopenharmony_ci  mod(n: Value): Decimal;
33861847f8eSopenharmony_ci
33961847f8eSopenharmony_ci  /**
34061847f8eSopenharmony_ci   * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`
34161847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
34261847f8eSopenharmony_ci   *
34361847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
34461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
34561847f8eSopenharmony_ci   * @atomicservice
34661847f8eSopenharmony_ci   * @since 12
34761847f8eSopenharmony_ci   */
34861847f8eSopenharmony_ci  sqrt(): Decimal;
34961847f8eSopenharmony_ci
35061847f8eSopenharmony_ci  /**
35161847f8eSopenharmony_ci   * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to
35261847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
35361847f8eSopenharmony_ci   *
35461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
35561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
35661847f8eSopenharmony_ci   * @atomicservice
35761847f8eSopenharmony_ci   * @since 12
35861847f8eSopenharmony_ci   */
35961847f8eSopenharmony_ci  cbrt(): Decimal;
36061847f8eSopenharmony_ci
36161847f8eSopenharmony_ci  /**
36261847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal raised to the power `n`, rounded
36361847f8eSopenharmony_ci   * to `precision` significant digits using rounding mode `rounding`.
36461847f8eSopenharmony_ci   *
36561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
36661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
36761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
36861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
36961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
37061847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
37161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
37261847f8eSopenharmony_ci   * @atomicservice
37361847f8eSopenharmony_ci   * @since 12
37461847f8eSopenharmony_ci   */
37561847f8eSopenharmony_ci  pow(n: Value): Decimal;
37661847f8eSopenharmony_ci
37761847f8eSopenharmony_ci  /**
37861847f8eSopenharmony_ci   * Return a new Decimal whose value is the natural exponential of the value of this Decimal,
37961847f8eSopenharmony_ci   * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`
38061847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
38161847f8eSopenharmony_ci   *
38261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
38361847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
38461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
38561847f8eSopenharmony_ci   * @atomicservice
38661847f8eSopenharmony_ci   * @since 12
38761847f8eSopenharmony_ci   */
38861847f8eSopenharmony_ci  exp(): Decimal;
38961847f8eSopenharmony_ci
39061847f8eSopenharmony_ci  /**
39161847f8eSopenharmony_ci   * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`
39261847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
39361847f8eSopenharmony_ci   *
39461847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
39561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
39661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
39761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
39861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
39961847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
40061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
40161847f8eSopenharmony_ci   * @atomicservice
40261847f8eSopenharmony_ci   * @since 12
40361847f8eSopenharmony_ci   */
40461847f8eSopenharmony_ci  log(n: Value): Decimal;
40561847f8eSopenharmony_ci
40661847f8eSopenharmony_ci  /**
40761847f8eSopenharmony_ci   * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,
40861847f8eSopenharmony_ci   * rounded to `precision` significant digits using rounding mode `rounding`.
40961847f8eSopenharmony_ci   *
41061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
41161847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
41261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
41361847f8eSopenharmony_ci   * @atomicservice
41461847f8eSopenharmony_ci   * @since 12
41561847f8eSopenharmony_ci   */
41661847f8eSopenharmony_ci  ln(): Decimal;
41761847f8eSopenharmony_ci
41861847f8eSopenharmony_ci  /**
41961847f8eSopenharmony_ci   * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.
42061847f8eSopenharmony_ci   *
42161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
42261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
42361847f8eSopenharmony_ci   * @atomicservice
42461847f8eSopenharmony_ci   * @since 12
42561847f8eSopenharmony_ci   */
42661847f8eSopenharmony_ci  cos(): Decimal;
42761847f8eSopenharmony_ci
42861847f8eSopenharmony_ci  /**
42961847f8eSopenharmony_ci   * Return a new Decimal whose value is the sine of the value in radians of this Decimal.
43061847f8eSopenharmony_ci   *
43161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
43261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
43361847f8eSopenharmony_ci   * @atomicservice
43461847f8eSopenharmony_ci   * @since 12
43561847f8eSopenharmony_ci   */
43661847f8eSopenharmony_ci  sin(): Decimal;
43761847f8eSopenharmony_ci
43861847f8eSopenharmony_ci  /**
43961847f8eSopenharmony_ci   * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.
44061847f8eSopenharmony_ci   *
44161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
44261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
44361847f8eSopenharmony_ci   * @atomicservice
44461847f8eSopenharmony_ci   * @since 12
44561847f8eSopenharmony_ci   */
44661847f8eSopenharmony_ci  tan(): Decimal;
44761847f8eSopenharmony_ci
44861847f8eSopenharmony_ci  /**
44961847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this
45061847f8eSopenharmony_ci   * Decimal.
45161847f8eSopenharmony_ci   *
45261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
45361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
45461847f8eSopenharmony_ci   * @atomicservice
45561847f8eSopenharmony_ci   * @since 12
45661847f8eSopenharmony_ci   */
45761847f8eSopenharmony_ci  cosh(): Decimal;
45861847f8eSopenharmony_ci
45961847f8eSopenharmony_ci  /**
46061847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal.
46161847f8eSopenharmony_ci   *
46261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
46361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
46461847f8eSopenharmony_ci   * @atomicservice
46561847f8eSopenharmony_ci   * @since 12
46661847f8eSopenharmony_ci   */
46761847f8eSopenharmony_ci  sinh(): Decimal;
46861847f8eSopenharmony_ci
46961847f8eSopenharmony_ci  /**
47061847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this Decimal.
47161847f8eSopenharmony_ci   *
47261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
47361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
47461847f8eSopenharmony_ci   * @atomicservice
47561847f8eSopenharmony_ci   * @since 12
47661847f8eSopenharmony_ci   */
47761847f8eSopenharmony_ci  tanh(): Decimal;
47861847f8eSopenharmony_ci
47961847f8eSopenharmony_ci  /**
48061847f8eSopenharmony_ci   * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of this Decimal.
48161847f8eSopenharmony_ci   *
48261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
48361847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
48461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
48561847f8eSopenharmony_ci   * @atomicservice
48661847f8eSopenharmony_ci   * @since 12
48761847f8eSopenharmony_ci   */
48861847f8eSopenharmony_ci  acos(): Decimal;
48961847f8eSopenharmony_ci
49061847f8eSopenharmony_ci  /**
49161847f8eSopenharmony_ci   * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this
49261847f8eSopenharmony_ci   * Decimal.
49361847f8eSopenharmony_ci   *
49461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
49561847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
49661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
49761847f8eSopenharmony_ci   * @atomicservice
49861847f8eSopenharmony_ci   * @since 12
49961847f8eSopenharmony_ci   */
50061847f8eSopenharmony_ci  asin(): Decimal;
50161847f8eSopenharmony_ci
50261847f8eSopenharmony_ci  /**
50361847f8eSopenharmony_ci   * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value of this Decimal.
50461847f8eSopenharmony_ci   *
50561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
50661847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
50761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
50861847f8eSopenharmony_ci   * @atomicservice
50961847f8eSopenharmony_ci   * @since 12
51061847f8eSopenharmony_ci   */
51161847f8eSopenharmony_ci  atan(): Decimal;
51261847f8eSopenharmony_ci
51361847f8eSopenharmony_ci  /**
51461847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the
51561847f8eSopenharmony_ci   * value of this Decimal.
51661847f8eSopenharmony_ci   *
51761847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
51861847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
51961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
52061847f8eSopenharmony_ci   * @atomicservice
52161847f8eSopenharmony_ci   * @since 12
52261847f8eSopenharmony_ci   */
52361847f8eSopenharmony_ci  acosh(): Decimal;
52461847f8eSopenharmony_ci
52561847f8eSopenharmony_ci  /**
52661847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value
52761847f8eSopenharmony_ci   * of this Decimal.
52861847f8eSopenharmony_ci   *
52961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
53061847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
53161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
53261847f8eSopenharmony_ci   * @atomicservice
53361847f8eSopenharmony_ci   * @since 12
53461847f8eSopenharmony_ci   */
53561847f8eSopenharmony_ci  asinh(): Decimal;
53661847f8eSopenharmony_ci
53761847f8eSopenharmony_ci  /**
53861847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the
53961847f8eSopenharmony_ci   * value of this Decimal.
54061847f8eSopenharmony_ci   *
54161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
54261847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
54361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
54461847f8eSopenharmony_ci   * @atomicservice
54561847f8eSopenharmony_ci   * @since 12
54661847f8eSopenharmony_ci   */
54761847f8eSopenharmony_ci  atanh(): Decimal;
54861847f8eSopenharmony_ci
54961847f8eSopenharmony_ci  /**
55061847f8eSopenharmony_ci   * Return
55161847f8eSopenharmony_ci   *   1    if the value of this Decimal is greater than the value of `n`,
55261847f8eSopenharmony_ci   *  -1    if the value of this Decimal is less than the value of `n`,
55361847f8eSopenharmony_ci   *   0    if they have the same value,
55461847f8eSopenharmony_ci   *   NaN  if the value of either Decimal is NaN.
55561847f8eSopenharmony_ci   *
55661847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
55761847f8eSopenharmony_ci   * @returns { number } the number type
55861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
55961847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
56061847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
56161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
56261847f8eSopenharmony_ci   * @atomicservice
56361847f8eSopenharmony_ci   * @since 12
56461847f8eSopenharmony_ci   */
56561847f8eSopenharmony_ci  comparedTo(n: Value): number;
56661847f8eSopenharmony_ci
56761847f8eSopenharmony_ci  /**
56861847f8eSopenharmony_ci   * Return true if the value of this Decimal is equal to the value of `n`, otherwise return false.
56961847f8eSopenharmony_ci   *
57061847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
57161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
57261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
57361847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
57461847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
57561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
57661847f8eSopenharmony_ci   * @atomicservice
57761847f8eSopenharmony_ci   * @since 12
57861847f8eSopenharmony_ci   */
57961847f8eSopenharmony_ci  equals(n: Value): boolean;
58061847f8eSopenharmony_ci
58161847f8eSopenharmony_ci  /**
58261847f8eSopenharmony_ci   * Return true if the value of this Decimal is greater than the value of `n`, otherwise return false.
58361847f8eSopenharmony_ci   *
58461847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
58561847f8eSopenharmony_ci   * @returns { boolean } the boolean type
58661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
58761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
58861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
58961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
59061847f8eSopenharmony_ci   * @atomicservice
59161847f8eSopenharmony_ci   * @since 12
59261847f8eSopenharmony_ci   */
59361847f8eSopenharmony_ci  greaterThan(n: Value): boolean;
59461847f8eSopenharmony_ci
59561847f8eSopenharmony_ci  /**
59661847f8eSopenharmony_ci   * Return true if the value of this Decimal is greater than or equal to the value of `n`,
59761847f8eSopenharmony_ci   * otherwise return false.
59861847f8eSopenharmony_ci   *
59961847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
60061847f8eSopenharmony_ci   * @returns { boolean } the boolean type
60161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
60261847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
60361847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
60461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
60561847f8eSopenharmony_ci   * @atomicservice
60661847f8eSopenharmony_ci   * @since 12
60761847f8eSopenharmony_ci   */
60861847f8eSopenharmony_ci  greaterThanOrEqualTo(n: Value): boolean;
60961847f8eSopenharmony_ci
61061847f8eSopenharmony_ci  /**
61161847f8eSopenharmony_ci   * Return true if the value of this Decimal is less than `n`, otherwise return false.
61261847f8eSopenharmony_ci   *
61361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
61461847f8eSopenharmony_ci   * @returns { boolean } the boolean type
61561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
61661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
61761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
61861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
61961847f8eSopenharmony_ci   * @atomicservice
62061847f8eSopenharmony_ci   * @since 12
62161847f8eSopenharmony_ci   */
62261847f8eSopenharmony_ci  lessThan(n: Value): boolean;
62361847f8eSopenharmony_ci
62461847f8eSopenharmony_ci  /**
62561847f8eSopenharmony_ci   * Return true if the value of this Decimal is less than or equal to `n`, otherwise return false.
62661847f8eSopenharmony_ci   *
62761847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
62861847f8eSopenharmony_ci   * @returns { boolean } the boolean type
62961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
63061847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
63161847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
63261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
63361847f8eSopenharmony_ci   * @atomicservice
63461847f8eSopenharmony_ci   * @since 12
63561847f8eSopenharmony_ci   */
63661847f8eSopenharmony_ci  lessThanOrEqualTo(n: Value): boolean;
63761847f8eSopenharmony_ci
63861847f8eSopenharmony_ci  /**
63961847f8eSopenharmony_ci   * Return true if the value of this Decimal is a finite number, otherwise return false.
64061847f8eSopenharmony_ci   *
64161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
64261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
64361847f8eSopenharmony_ci   * @atomicservice
64461847f8eSopenharmony_ci   * @since 12
64561847f8eSopenharmony_ci   */
64661847f8eSopenharmony_ci  isFinite(): boolean;
64761847f8eSopenharmony_ci
64861847f8eSopenharmony_ci  /**
64961847f8eSopenharmony_ci   * Return true if the value of this Decimal is an integer, otherwise return false.
65061847f8eSopenharmony_ci   *
65161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
65261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
65361847f8eSopenharmony_ci   * @atomicservice
65461847f8eSopenharmony_ci   * @since 12
65561847f8eSopenharmony_ci   */
65661847f8eSopenharmony_ci  isInteger(): boolean;
65761847f8eSopenharmony_ci
65861847f8eSopenharmony_ci  /**
65961847f8eSopenharmony_ci   * Return true if the value of this Decimal is NaN, otherwise return false.
66061847f8eSopenharmony_ci   *
66161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
66261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
66361847f8eSopenharmony_ci   * @atomicservice
66461847f8eSopenharmony_ci   * @since 12
66561847f8eSopenharmony_ci   */
66661847f8eSopenharmony_ci  isNaN(): boolean;
66761847f8eSopenharmony_ci
66861847f8eSopenharmony_ci  /**
66961847f8eSopenharmony_ci   * Return true if the value of this Decimal is negative, otherwise return false.
67061847f8eSopenharmony_ci   *
67161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
67261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
67361847f8eSopenharmony_ci   * @atomicservice
67461847f8eSopenharmony_ci   * @since 12
67561847f8eSopenharmony_ci   */
67661847f8eSopenharmony_ci  isNegative(): boolean;
67761847f8eSopenharmony_ci
67861847f8eSopenharmony_ci  /**
67961847f8eSopenharmony_ci   * Return true if the value of this Decimal is positive, otherwise return false.
68061847f8eSopenharmony_ci   *
68161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
68261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
68361847f8eSopenharmony_ci   * @atomicservice
68461847f8eSopenharmony_ci   * @since 12
68561847f8eSopenharmony_ci   */
68661847f8eSopenharmony_ci  isPositive(): boolean;
68761847f8eSopenharmony_ci
68861847f8eSopenharmony_ci  /**
68961847f8eSopenharmony_ci   * Return true if the value of this Decimal is 0 or -0, otherwise return false.
69061847f8eSopenharmony_ci   *
69161847f8eSopenharmony_ci   * @returns { boolean } the boolean type
69261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
69361847f8eSopenharmony_ci   * @atomicservice
69461847f8eSopenharmony_ci   * @since 12
69561847f8eSopenharmony_ci   */
69661847f8eSopenharmony_ci  isZero(): boolean;
69761847f8eSopenharmony_ci
69861847f8eSopenharmony_ci  /**
69961847f8eSopenharmony_ci   * Return a new Decimal whose value is the integer part of dividing the value of this Decimal
70061847f8eSopenharmony_ci   * by the value of `n`, rounded to `precision` significant digits using rounding mode `rounding`.
70161847f8eSopenharmony_ci   *
70261847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
70361847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
70461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
70561847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
70661847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
70761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
70861847f8eSopenharmony_ci   * @atomicservice
70961847f8eSopenharmony_ci   * @since 12
71061847f8eSopenharmony_ci   */
71161847f8eSopenharmony_ci  dividedToIntegerBy(n: Value): Decimal;
71261847f8eSopenharmony_ci
71361847f8eSopenharmony_ci  /**
71461847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by -1.
71561847f8eSopenharmony_ci   *
71661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
71761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
71861847f8eSopenharmony_ci   * @atomicservice
71961847f8eSopenharmony_ci   * @since 12
72061847f8eSopenharmony_ci   */
72161847f8eSopenharmony_ci  negate(): Decimal;
72261847f8eSopenharmony_ci
72361847f8eSopenharmony_ci  /**
72461847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 2.
72561847f8eSopenharmony_ci   *
72661847f8eSopenharmony_ci   * @returns { string } the string type
72761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
72861847f8eSopenharmony_ci   * @atomicservice
72961847f8eSopenharmony_ci   * @since 12
73061847f8eSopenharmony_ci   */
73161847f8eSopenharmony_ci  toBinary(): string;
73261847f8eSopenharmony_ci
73361847f8eSopenharmony_ci  /**
73461847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 2, round to `significantDigits`
73561847f8eSopenharmony_ci   * significant digits.
73661847f8eSopenharmony_ci   *
73761847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
73861847f8eSopenharmony_ci   * @returns { string } the string type
73961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits` is out of range.
74061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
74161847f8eSopenharmony_ci   * @atomicservice
74261847f8eSopenharmony_ci   * @since 12
74361847f8eSopenharmony_ci   */
74461847f8eSopenharmony_ci  toBinary(significantDigits: number): string;
74561847f8eSopenharmony_ci
74661847f8eSopenharmony_ci  /**
74761847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 2, round to `significantDigits`
74861847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
74961847f8eSopenharmony_ci   *
75061847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
75161847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
75261847f8eSopenharmony_ci   * @returns { string } the string type
75361847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
75461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
75561847f8eSopenharmony_ci   * @atomicservice
75661847f8eSopenharmony_ci   * @since 12
75761847f8eSopenharmony_ci   */
75861847f8eSopenharmony_ci  toBinary(significantDigits: number, rounding: Rounding): string;
75961847f8eSopenharmony_ci
76061847f8eSopenharmony_ci  /**
76161847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 8.
76261847f8eSopenharmony_ci   *
76361847f8eSopenharmony_ci   * @returns { string } the string type
76461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
76561847f8eSopenharmony_ci   * @atomicservice
76661847f8eSopenharmony_ci   * @since 12
76761847f8eSopenharmony_ci   */
76861847f8eSopenharmony_ci  toOctal(): string;
76961847f8eSopenharmony_ci
77061847f8eSopenharmony_ci  /**
77161847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 8, round to `significantDigits` significant.
77261847f8eSopenharmony_ci   *
77361847f8eSopenharmony_ci   * @param { number } significantDigits {number | string | Decimal}
77461847f8eSopenharmony_ci   * @returns { string } the string type
77561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits` is out of range.
77661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
77761847f8eSopenharmony_ci   * @atomicservice
77861847f8eSopenharmony_ci   * @since 12
77961847f8eSopenharmony_ci   */
78061847f8eSopenharmony_ci  toOctal(significantDigits: number): string;
78161847f8eSopenharmony_ci
78261847f8eSopenharmony_ci  /**
78361847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 8, round to `significantDigits` significant
78461847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
78561847f8eSopenharmony_ci   *
78661847f8eSopenharmony_ci   * @param { number } significantDigits {number | string | Decimal}
78761847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
78861847f8eSopenharmony_ci   * @returns { string } the string type
78961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
79061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
79161847f8eSopenharmony_ci   * @atomicservice
79261847f8eSopenharmony_ci   * @since 12
79361847f8eSopenharmony_ci   */
79461847f8eSopenharmony_ci  toOctal(significantDigits: number, rounding: Rounding): string;
79561847f8eSopenharmony_ci
79661847f8eSopenharmony_ci  /**
79761847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 16
79861847f8eSopenharmony_ci   *
79961847f8eSopenharmony_ci   * @returns { string } the string type
80061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
80161847f8eSopenharmony_ci   * @atomicservice
80261847f8eSopenharmony_ci   * @since 12
80361847f8eSopenharmony_ci   */
80461847f8eSopenharmony_ci  toHexadecimal(): string;
80561847f8eSopenharmony_ci
80661847f8eSopenharmony_ci  /**
80761847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 16, round to `significantDigits` significant.
80861847f8eSopenharmony_ci   *
80961847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
81061847f8eSopenharmony_ci   * @returns { string } the string type
81161847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits` is out of range.
81261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
81361847f8eSopenharmony_ci   * @atomicservice
81461847f8eSopenharmony_ci   * @since 12
81561847f8eSopenharmony_ci   */
81661847f8eSopenharmony_ci  toHexadecimal(significantDigits: number): string;
81761847f8eSopenharmony_ci
81861847f8eSopenharmony_ci  /**
81961847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in base 16, round to `significantDigits` significant
82061847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
82161847f8eSopenharmony_ci   *
82261847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
82361847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
82461847f8eSopenharmony_ci   * @returns { string } the string type
82561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
82661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
82761847f8eSopenharmony_ci   * @atomicservice
82861847f8eSopenharmony_ci   * @since 12
82961847f8eSopenharmony_ci   */
83061847f8eSopenharmony_ci  toHexadecimal(significantDigits: number, rounding: Rounding): string;
83161847f8eSopenharmony_ci
83261847f8eSopenharmony_ci  /**
83361847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal.
83461847f8eSopenharmony_ci   *
83561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
83661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
83761847f8eSopenharmony_ci   * @atomicservice
83861847f8eSopenharmony_ci   * @since 12
83961847f8eSopenharmony_ci   */
84061847f8eSopenharmony_ci  toDecimalPlaces(): Decimal;
84161847f8eSopenharmony_ci
84261847f8eSopenharmony_ci  /**
84361847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `decimalPlaces`
84461847f8eSopenharmony_ci   * decimal places.
84561847f8eSopenharmony_ci   *
84661847f8eSopenharmony_ci   * @param { number } decimalPlaces Significant digits. Integer, 1 to MAX_DIGITS inclusive.
84761847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
84861847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces` is out of range.
84961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
85061847f8eSopenharmony_ci   * @atomicservice
85161847f8eSopenharmony_ci   * @since 12
85261847f8eSopenharmony_ci   */
85361847f8eSopenharmony_ci  toDecimalPlaces(decimalPlaces: number): Decimal;
85461847f8eSopenharmony_ci
85561847f8eSopenharmony_ci  /**
85661847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `decimalPlaces`
85761847f8eSopenharmony_ci   * decimal places using rounding mode `rounding`.
85861847f8eSopenharmony_ci   *
85961847f8eSopenharmony_ci   * @param { number } decimalPlaces Significant digits. Integer, 1 to MAX_DIGITS inclusive.
86061847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
86161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
86261847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces | rounding` is out of range.
86361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
86461847f8eSopenharmony_ci   * @atomicservice
86561847f8eSopenharmony_ci   * @since 12
86661847f8eSopenharmony_ci   */
86761847f8eSopenharmony_ci  toDecimalPlaces(decimalPlaces: number, rounding: Rounding): Decimal;
86861847f8eSopenharmony_ci
86961847f8eSopenharmony_ci  /**
87061847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in exponential notation.
87161847f8eSopenharmony_ci   *
87261847f8eSopenharmony_ci   * @returns { string } the string type
87361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
87461847f8eSopenharmony_ci   * @atomicservice
87561847f8eSopenharmony_ci   * @since 12
87661847f8eSopenharmony_ci   */
87761847f8eSopenharmony_ci  toExponential(): string;
87861847f8eSopenharmony_ci
87961847f8eSopenharmony_ci  /**
88061847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in exponential notation rounded to
88161847f8eSopenharmony_ci   * `decimalPlaces` fixed decimal places.
88261847f8eSopenharmony_ci   *
88361847f8eSopenharmony_ci   * @param { number } decimalPlaces Decimal places. Integer, 0 to MAX_DIGITS inclusive.
88461847f8eSopenharmony_ci   * @returns { string } the string type
88561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces` is out of range.
88661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
88761847f8eSopenharmony_ci   * @atomicservice
88861847f8eSopenharmony_ci   * @since 12
88961847f8eSopenharmony_ci   */
89061847f8eSopenharmony_ci  toExponential(decimalPlaces: number): string;
89161847f8eSopenharmony_ci
89261847f8eSopenharmony_ci  /**
89361847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in exponential notation rounded to
89461847f8eSopenharmony_ci   * `decimalPlaces` fixed decimal places using rounding mode `rounding`.
89561847f8eSopenharmony_ci   *
89661847f8eSopenharmony_ci   * @param { number } decimalPlaces Decimal places. Integer, 0 to MAX_DIGITS inclusive.
89761847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
89861847f8eSopenharmony_ci   * @returns { string } the string type
89961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces | rounding` is out of range.
90061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
90161847f8eSopenharmony_ci   * @atomicservice
90261847f8eSopenharmony_ci   * @since 12
90361847f8eSopenharmony_ci   */
90461847f8eSopenharmony_ci  toExponential(decimalPlaces: number, rounding: Rounding): string;
90561847f8eSopenharmony_ci
90661847f8eSopenharmony_ci  /**
90761847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in normal (fixed-point).
90861847f8eSopenharmony_ci   *
90961847f8eSopenharmony_ci   * @returns { string } the string type
91061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
91161847f8eSopenharmony_ci   * @atomicservice
91261847f8eSopenharmony_ci   * @since 12
91361847f8eSopenharmony_ci   */
91461847f8eSopenharmony_ci  toFixed(): string;
91561847f8eSopenharmony_ci
91661847f8eSopenharmony_ci  /**
91761847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in normal (fixed-point) notation to
91861847f8eSopenharmony_ci   * `decimalPlaces` fixed decimal places.
91961847f8eSopenharmony_ci   *
92061847f8eSopenharmony_ci   * @param { number } decimalPlaces Decimal places. Integer, 0 to MAX_DIGITS inclusive.
92161847f8eSopenharmony_ci   * @returns { string } the string type
92261847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces` is out of range.
92361847f8eSopenharmony_ci   * @atomicservice
92461847f8eSopenharmony_ci   * @since 12
92561847f8eSopenharmony_ci   */
92661847f8eSopenharmony_ci  toFixed(decimalPlaces: number): string;
92761847f8eSopenharmony_ci
92861847f8eSopenharmony_ci  /**
92961847f8eSopenharmony_ci   * Return a string representing the value of this Decimal in normal (fixed-point) notation to
93061847f8eSopenharmony_ci   * `decimalPlaces` fixed decimal places and rounded using rounding mode `rounding`.
93161847f8eSopenharmony_ci   *
93261847f8eSopenharmony_ci   * @param { number } decimalPlaces Decimal places. Integer, 0 to MAX_DIGITS inclusive.
93361847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
93461847f8eSopenharmony_ci   * @returns { string } the string type
93561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `decimalPlaces | rounding` is out of range.
93661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
93761847f8eSopenharmony_ci   * @atomicservice
93861847f8eSopenharmony_ci   * @since 12
93961847f8eSopenharmony_ci   */
94061847f8eSopenharmony_ci  toFixed(decimalPlaces: number, rounding: Rounding): string;
94161847f8eSopenharmony_ci
94261847f8eSopenharmony_ci  /**
94361847f8eSopenharmony_ci   * Return an array representing the value of this Decimal as a simple fraction with an integer
94461847f8eSopenharmony_ci   * numerator and an integer denominator.
94561847f8eSopenharmony_ci   *
94661847f8eSopenharmony_ci   * @returns { Decimal[] } the Decimal[] type
94761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
94861847f8eSopenharmony_ci   * @atomicservice
94961847f8eSopenharmony_ci   * @since 12
95061847f8eSopenharmony_ci   */
95161847f8eSopenharmony_ci  toFraction(): Decimal[];
95261847f8eSopenharmony_ci
95361847f8eSopenharmony_ci  /**
95461847f8eSopenharmony_ci   * Return an array representing the value of this Decimal as a simple fraction with an integer
95561847f8eSopenharmony_ci   * numerator and an integer denominator. The denominator will be a positive non-zero value
95661847f8eSopenharmony_ci   * less than or equal to `max_denominator`.
95761847f8eSopenharmony_ci   *
95861847f8eSopenharmony_ci   * @param { Value } maxDenominator {number | string | Decimal}
95961847f8eSopenharmony_ci   * @returns { Decimal[] } the Decimal[] type
96061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
96161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
96261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
96361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
96461847f8eSopenharmony_ci   * @atomicservice
96561847f8eSopenharmony_ci   * @since 12
96661847f8eSopenharmony_ci   */
96761847f8eSopenharmony_ci  toFraction(maxDenominator: Value): Decimal[];
96861847f8eSopenharmony_ci
96961847f8eSopenharmony_ci  /**
97061847f8eSopenharmony_ci   * Returns a new Decimal whose value is the nearest multiple of `n`.
97161847f8eSopenharmony_ci   *
97261847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
97361847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
97461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
97561847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
97661847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
97761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
97861847f8eSopenharmony_ci   * @atomicservice
97961847f8eSopenharmony_ci   * @since 12
98061847f8eSopenharmony_ci   */
98161847f8eSopenharmony_ci  toNearest(n: Value): Decimal;
98261847f8eSopenharmony_ci
98361847f8eSopenharmony_ci  /**
98461847f8eSopenharmony_ci   * Returns a new Decimal whose value is the nearest multiple of `n` in the direction of rounding
98561847f8eSopenharmony_ci   * mode `rounding`, to the value of this Decimal.
98661847f8eSopenharmony_ci   *
98761847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
98861847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
98961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
99061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
99161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
99261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
99361847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `rounding` is out of range.
99461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
99561847f8eSopenharmony_ci   * @atomicservice
99661847f8eSopenharmony_ci   * @since 12
99761847f8eSopenharmony_ci   */
99861847f8eSopenharmony_ci  toNearest(n: Value, rounding: Rounding): Decimal;
99961847f8eSopenharmony_ci
100061847f8eSopenharmony_ci  /**
100161847f8eSopenharmony_ci   * Return a string representing the value of this Decimal.
100261847f8eSopenharmony_ci   *
100361847f8eSopenharmony_ci   * @returns { string } the string type
100461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
100561847f8eSopenharmony_ci   * @atomicservice
100661847f8eSopenharmony_ci   * @since 12
100761847f8eSopenharmony_ci   */
100861847f8eSopenharmony_ci  toPrecision(): string;
100961847f8eSopenharmony_ci
101061847f8eSopenharmony_ci  /**
101161847f8eSopenharmony_ci   * Return a string representing the value of this Decimal rounded to `significantDigits` significant digits.
101261847f8eSopenharmony_ci   *
101361847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
101461847f8eSopenharmony_ci   * @returns { string } the string type
101561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits` is out of range.
101661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
101761847f8eSopenharmony_ci   * @atomicservice
101861847f8eSopenharmony_ci   * @since 12
101961847f8eSopenharmony_ci   */
102061847f8eSopenharmony_ci  toPrecision(significantDigits: number): string;
102161847f8eSopenharmony_ci
102261847f8eSopenharmony_ci  /**
102361847f8eSopenharmony_ci   * Return a string representing the value of this Decimal rounded to `significantDigits` significant digits
102461847f8eSopenharmony_ci   * using rounding mode `rounding`.
102561847f8eSopenharmony_ci   *
102661847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
102761847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
102861847f8eSopenharmony_ci   * @returns { string } the string type
102961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
103061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
103161847f8eSopenharmony_ci   * @atomicservice
103261847f8eSopenharmony_ci   * @since 12
103361847f8eSopenharmony_ci   */
103461847f8eSopenharmony_ci  toPrecision(significantDigits: number, rounding: Rounding): string;
103561847f8eSopenharmony_ci
103661847f8eSopenharmony_ci  /**
103761847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal.
103861847f8eSopenharmony_ci   *
103961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
104061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
104161847f8eSopenharmony_ci   * @atomicservice
104261847f8eSopenharmony_ci   * @since 12
104361847f8eSopenharmony_ci   */
104461847f8eSopenharmony_ci  toSignificantDigits(): Decimal;
104561847f8eSopenharmony_ci
104661847f8eSopenharmony_ci  /**
104761847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `significantDigits`
104861847f8eSopenharmony_ci   * significant digits.
104961847f8eSopenharmony_ci   *
105061847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
105161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
105261847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits` is out of range.
105361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
105461847f8eSopenharmony_ci   * @atomicservice
105561847f8eSopenharmony_ci   * @since 12
105661847f8eSopenharmony_ci   */
105761847f8eSopenharmony_ci  toSignificantDigits(significantDigits: number): Decimal;
105861847f8eSopenharmony_ci
105961847f8eSopenharmony_ci  /**
106061847f8eSopenharmony_ci   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `significantDigits`
106161847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
106261847f8eSopenharmony_ci   *
106361847f8eSopenharmony_ci   * @param { number } significantDigits Significant digits. Integer, 1 to MAX_DIGITS inclusive.
106461847f8eSopenharmony_ci   * @param { Rounding } rounding Rounding mode. Integer, 0 to 8 inclusive.
106561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
106661847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `significantDigits | rounding` is out of range.
106761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
106861847f8eSopenharmony_ci   * @atomicservice
106961847f8eSopenharmony_ci   * @since 12
107061847f8eSopenharmony_ci   */
107161847f8eSopenharmony_ci  toSignificantDigits(significantDigits: number, rounding: Rounding): Decimal;
107261847f8eSopenharmony_ci
107361847f8eSopenharmony_ci  /**
107461847f8eSopenharmony_ci   * Return the value of this Decimal converted to a number primitive. Zero keeps its sign.
107561847f8eSopenharmony_ci   *
107661847f8eSopenharmony_ci   * @returns { number } the number type
107761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
107861847f8eSopenharmony_ci   * @atomicservice
107961847f8eSopenharmony_ci   * @since 12
108061847f8eSopenharmony_ci   */
108161847f8eSopenharmony_ci  toNumber(): number;
108261847f8eSopenharmony_ci
108361847f8eSopenharmony_ci  /**
108461847f8eSopenharmony_ci   * Return a string representing the value of this Decimal.
108561847f8eSopenharmony_ci   * Return exponential notation if this Decimal has a positive exponent equal to or greater than
108661847f8eSopenharmony_ci   * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
108761847f8eSopenharmony_ci   *
108861847f8eSopenharmony_ci   * @returns { string } the string type
108961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
109061847f8eSopenharmony_ci   * @atomicservice
109161847f8eSopenharmony_ci   * @since 12
109261847f8eSopenharmony_ci   */
109361847f8eSopenharmony_ci  toString(): string;
109461847f8eSopenharmony_ci
109561847f8eSopenharmony_ci  /**
109661847f8eSopenharmony_ci   * Return a string representing the value of this Decimal.
109761847f8eSopenharmony_ci   * Unlike `toString`, negative zero will include the minus sign.
109861847f8eSopenharmony_ci   *
109961847f8eSopenharmony_ci   * @returns { string } the string type
110061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
110161847f8eSopenharmony_ci   * @atomicservice
110261847f8eSopenharmony_ci   * @since 12
110361847f8eSopenharmony_ci   */
110461847f8eSopenharmony_ci  valueOf(): string;
110561847f8eSopenharmony_ci
110661847f8eSopenharmony_ci  /**
110761847f8eSopenharmony_ci   * Return the number of decimal places of the value of this Decimal.
110861847f8eSopenharmony_ci   *
110961847f8eSopenharmony_ci   * @returns { number } the number type
111061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
111161847f8eSopenharmony_ci   * @atomicservice
111261847f8eSopenharmony_ci   * @since 12
111361847f8eSopenharmony_ci   */
111461847f8eSopenharmony_ci  decimalPlaces(): number;
111561847f8eSopenharmony_ci
111661847f8eSopenharmony_ci  /**
111761847f8eSopenharmony_ci   * Return the number of significant digits of the value of this Decimal.
111861847f8eSopenharmony_ci   *
111961847f8eSopenharmony_ci   * @returns { number } the number type
112061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
112161847f8eSopenharmony_ci   * @atomicservice
112261847f8eSopenharmony_ci   * @since 12
112361847f8eSopenharmony_ci   */
112461847f8eSopenharmony_ci  precision(): number;
112561847f8eSopenharmony_ci
112661847f8eSopenharmony_ci  /**
112761847f8eSopenharmony_ci   * Return the number of significant digits of the value of this Decimal, whether to count 
112861847f8eSopenharmony_ci   * integer-part trailing zeros.
112961847f8eSopenharmony_ci   *
113061847f8eSopenharmony_ci   * @param { boolean | number } includeZeros Whether to count integer-part trailing zeros: true, false,
113161847f8eSopenharmony_ci   * 1 or 0.
113261847f8eSopenharmony_ci   * @returns { number } the number type
113361847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `includeZeros` is out of range.
113461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
113561847f8eSopenharmony_ci   * @atomicservice
113661847f8eSopenharmony_ci   * @since 12
113761847f8eSopenharmony_ci   */
113861847f8eSopenharmony_ci  precision(includeZeros: boolean | number): number;
113961847f8eSopenharmony_ci
114061847f8eSopenharmony_ci  /**
114161847f8eSopenharmony_ci   * Return a new Decimal whose value is the absolute value of `n`.
114261847f8eSopenharmony_ci   *
114361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
114461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
114561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
114661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
114761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
114861847f8eSopenharmony_ci   * @static
114961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
115061847f8eSopenharmony_ci   * @atomicservice
115161847f8eSopenharmony_ci   * @since 12
115261847f8eSopenharmony_ci   */
115361847f8eSopenharmony_ci  static abs(n: Value): Decimal;
115461847f8eSopenharmony_ci
115561847f8eSopenharmony_ci  /**
115661847f8eSopenharmony_ci   * Return a new Decimal whose value is `n` round to an integer using `ROUND_FLOOR`.
115761847f8eSopenharmony_ci   *
115861847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
115961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
116061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
116161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
116261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
116361847f8eSopenharmony_ci   * @static
116461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
116561847f8eSopenharmony_ci   * @atomicservice
116661847f8eSopenharmony_ci   * @since 12
116761847f8eSopenharmony_ci   */
116861847f8eSopenharmony_ci  static floor(n: Value): Decimal;
116961847f8eSopenharmony_ci
117061847f8eSopenharmony_ci  /**
117161847f8eSopenharmony_ci   * Return a new Decimal whose value is `n` rounded to an integer using `ROUND_CEIL`.
117261847f8eSopenharmony_ci   *
117361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
117461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
117561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
117661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
117761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
117861847f8eSopenharmony_ci   * @static
117961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
118061847f8eSopenharmony_ci   * @atomicservice
118161847f8eSopenharmony_ci   * @since 12
118261847f8eSopenharmony_ci   */
118361847f8eSopenharmony_ci  static ceil(n: Value): Decimal;
118461847f8eSopenharmony_ci
118561847f8eSopenharmony_ci  /**
118661847f8eSopenharmony_ci   * Return a new Decimal whose value is `n` truncated to an integer.
118761847f8eSopenharmony_ci   *
118861847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
118961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
119061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
119161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
119261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
119361847f8eSopenharmony_ci   * @static
119461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
119561847f8eSopenharmony_ci   * @atomicservice
119661847f8eSopenharmony_ci   * @since 12
119761847f8eSopenharmony_ci   */
119861847f8eSopenharmony_ci  static trunc(n: Value): Decimal;
119961847f8eSopenharmony_ci
120061847f8eSopenharmony_ci  /**
120161847f8eSopenharmony_ci   * Return a new Decimal whose value is `n` clamped to the range delineated by `min` and `max`.
120261847f8eSopenharmony_ci   *
120361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
120461847f8eSopenharmony_ci   * @param { Value } min {number | string | Decimal}
120561847f8eSopenharmony_ci   * @param { Value } max {number | string | Decimal}
120661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
120761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
120861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
120961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
121061847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `min` is out of range.
121161847f8eSopenharmony_ci   * @static
121261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
121361847f8eSopenharmony_ci   * @atomicservice
121461847f8eSopenharmony_ci   * @since 12
121561847f8eSopenharmony_ci   */
121661847f8eSopenharmony_ci  static clamp(n: Value, min: Value, max: Value): Decimal;
121761847f8eSopenharmony_ci
121861847f8eSopenharmony_ci  /**
121961847f8eSopenharmony_ci   * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant
122061847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
122161847f8eSopenharmony_ci   *
122261847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal}
122361847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal}
122461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
122561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
122661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
122761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
122861847f8eSopenharmony_ci   * @static
122961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
123061847f8eSopenharmony_ci   * @atomicservice
123161847f8eSopenharmony_ci   * @since 12
123261847f8eSopenharmony_ci   */
123361847f8eSopenharmony_ci  static add(x: Value, y: Value): Decimal;
123461847f8eSopenharmony_ci
123561847f8eSopenharmony_ci  /**
123661847f8eSopenharmony_ci   * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`
123761847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
123861847f8eSopenharmony_ci   *
123961847f8eSopenharmony_ci   * Only the result is rounded, not the intermediate calculations.
124061847f8eSopenharmony_ci   *
124161847f8eSopenharmony_ci   * @param { Value[] } n {number | string | Decimal}
124261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
124361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
124461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
124561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
124661847f8eSopenharmony_ci   * @static
124761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
124861847f8eSopenharmony_ci   * @atomicservice
124961847f8eSopenharmony_ci   * @since 12
125061847f8eSopenharmony_ci   */
125161847f8eSopenharmony_ci  static sum(...n: Value[]): Decimal;
125261847f8eSopenharmony_ci
125361847f8eSopenharmony_ci  /**
125461847f8eSopenharmony_ci   * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits
125561847f8eSopenharmony_ci   * using rounding mode `rounding`.
125661847f8eSopenharmony_ci   *
125761847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal}
125861847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal}
125961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
126061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
126161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
126261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
126361847f8eSopenharmony_ci   * @static
126461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
126561847f8eSopenharmony_ci   * @atomicservice
126661847f8eSopenharmony_ci   * @since 12
126761847f8eSopenharmony_ci   */
126861847f8eSopenharmony_ci  static sub(x: Value, y: Value): Decimal;
126961847f8eSopenharmony_ci
127061847f8eSopenharmony_ci  /**
127161847f8eSopenharmony_ci   * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant
127261847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
127361847f8eSopenharmony_ci   *
127461847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal}
127561847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal}
127661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
127761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
127861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
127961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
128061847f8eSopenharmony_ci   * @static
128161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
128261847f8eSopenharmony_ci   * @atomicservice
128361847f8eSopenharmony_ci   * @since 12
128461847f8eSopenharmony_ci   */
128561847f8eSopenharmony_ci  static mul(x: Value, y: Value): Decimal;
128661847f8eSopenharmony_ci
128761847f8eSopenharmony_ci  /**
128861847f8eSopenharmony_ci   * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant
128961847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
129061847f8eSopenharmony_ci   *
129161847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal}
129261847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal}
129361847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
129461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
129561847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
129661847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
129761847f8eSopenharmony_ci   * @static
129861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
129961847f8eSopenharmony_ci   * @atomicservice
130061847f8eSopenharmony_ci   * @since 12
130161847f8eSopenharmony_ci   */
130261847f8eSopenharmony_ci  static div(x: Value, y: Value): Decimal;
130361847f8eSopenharmony_ci
130461847f8eSopenharmony_ci  /**
130561847f8eSopenharmony_ci   * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits
130661847f8eSopenharmony_ci   * using rounding mode `rounding`.
130761847f8eSopenharmony_ci   *
130861847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal}
130961847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal}
131061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
131161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
131261847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
131361847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
131461847f8eSopenharmony_ci   * @static
131561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
131661847f8eSopenharmony_ci   * @atomicservice
131761847f8eSopenharmony_ci   * @since 12
131861847f8eSopenharmony_ci   */
131961847f8eSopenharmony_ci  static mod(x: Value, y: Value): Decimal;
132061847f8eSopenharmony_ci
132161847f8eSopenharmony_ci  /**
132261847f8eSopenharmony_ci   * Return a new Decimal whose value is the square root of `n`, rounded to `precision` significant
132361847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
132461847f8eSopenharmony_ci   *
132561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
132661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
132761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
132861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
132961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
133061847f8eSopenharmony_ci   * @static
133161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
133261847f8eSopenharmony_ci   * @atomicservice
133361847f8eSopenharmony_ci   * @since 12
133461847f8eSopenharmony_ci   */
133561847f8eSopenharmony_ci  static sqrt(n: Value): Decimal;
133661847f8eSopenharmony_ci
133761847f8eSopenharmony_ci  /**
133861847f8eSopenharmony_ci   * Return a new Decimal whose value is the cube root of `n`, rounded to `precision` significant
133961847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
134061847f8eSopenharmony_ci   *
134161847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
134261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
134361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
134461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
134561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
134661847f8eSopenharmony_ci   * @static
134761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
134861847f8eSopenharmony_ci   * @atomicservice
134961847f8eSopenharmony_ci   * @since 12
135061847f8eSopenharmony_ci   */
135161847f8eSopenharmony_ci  static cbrt(n: Value): Decimal;
135261847f8eSopenharmony_ci
135361847f8eSopenharmony_ci  /**
135461847f8eSopenharmony_ci   * Return a new Decimal whose value is `base` raised to the power `exponent`, rounded to precision
135561847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
135661847f8eSopenharmony_ci   *
135761847f8eSopenharmony_ci   * @param { Value } base {number | string | Decimal} The base.
135861847f8eSopenharmony_ci   * @param { Value } exponent {number | string | Decimal} The exponent.
135961847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
136061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
136161847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
136261847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
136361847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
136461847f8eSopenharmony_ci   * @static
136561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
136661847f8eSopenharmony_ci   * @atomicservice
136761847f8eSopenharmony_ci   * @since 12
136861847f8eSopenharmony_ci   */
136961847f8eSopenharmony_ci  static pow(base: Value, exponent: Value): Decimal;
137061847f8eSopenharmony_ci
137161847f8eSopenharmony_ci  /**
137261847f8eSopenharmony_ci   * Return a new Decimal whose value is the natural exponential of `n`, rounded to `precision`
137361847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
137461847f8eSopenharmony_ci   *
137561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
137661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
137761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
137861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
137961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
138061847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
138161847f8eSopenharmony_ci   * @static
138261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
138361847f8eSopenharmony_ci   * @atomicservice
138461847f8eSopenharmony_ci   * @since 12
138561847f8eSopenharmony_ci   */
138661847f8eSopenharmony_ci  static exp(n: Value): Decimal;
138761847f8eSopenharmony_ci
138861847f8eSopenharmony_ci  /**
138961847f8eSopenharmony_ci   * Return a new Decimal whose value is the log of `n` to the base `base`, rounded to `precision`
139061847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
139161847f8eSopenharmony_ci   *
139261847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
139361847f8eSopenharmony_ci   * @param { Value } base {number | string | Decimal}
139461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
139561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
139661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
139761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
139861847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
139961847f8eSopenharmony_ci   * @static
140061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
140161847f8eSopenharmony_ci   * @atomicservice
140261847f8eSopenharmony_ci   * @since 12
140361847f8eSopenharmony_ci   */
140461847f8eSopenharmony_ci  static log(n: Value, base: Value): Decimal;
140561847f8eSopenharmony_ci
140661847f8eSopenharmony_ci  /**
140761847f8eSopenharmony_ci   * Return a new Decimal whose value is the natural logarithm of `n`, rounded to `precision`
140861847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
140961847f8eSopenharmony_ci   *
141061847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
141161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
141261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
141361847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
141461847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
141561847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
141661847f8eSopenharmony_ci   * @static
141761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
141861847f8eSopenharmony_ci   * @atomicservice
141961847f8eSopenharmony_ci   * @since 12
142061847f8eSopenharmony_ci   */
142161847f8eSopenharmony_ci  static ln(n: Value): Decimal;
142261847f8eSopenharmony_ci
142361847f8eSopenharmony_ci  /**
142461847f8eSopenharmony_ci   * Return a new Decimal whose value is the base 2 logarithm of `n`, rounded to `precision`
142561847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
142661847f8eSopenharmony_ci   *
142761847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
142861847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
142961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
143061847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
143161847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
143261847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
143361847f8eSopenharmony_ci   * @static
143461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
143561847f8eSopenharmony_ci   * @atomicservice
143661847f8eSopenharmony_ci   * @since 12
143761847f8eSopenharmony_ci   */
143861847f8eSopenharmony_ci  static log2(n: Value): Decimal;
143961847f8eSopenharmony_ci
144061847f8eSopenharmony_ci  /**
144161847f8eSopenharmony_ci   * Return a new Decimal whose value is the base 10 logarithm of `n`, rounded to `precision`
144261847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
144361847f8eSopenharmony_ci   *
144461847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
144561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
144661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
144761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
144861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
144961847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
145061847f8eSopenharmony_ci   * @static
145161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
145261847f8eSopenharmony_ci   * @atomicservice
145361847f8eSopenharmony_ci   * @since 12
145461847f8eSopenharmony_ci   */
145561847f8eSopenharmony_ci  static log10(n: Value): Decimal;
145661847f8eSopenharmony_ci
145761847f8eSopenharmony_ci  /**
145861847f8eSopenharmony_ci   * Return a new Decimal whose value is the cosine of `n`, rounded to `precision` significant
145961847f8eSopenharmony_ci   * digits using rounding mode `rounding`
146061847f8eSopenharmony_ci   *
146161847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
146261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
146361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
146461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
146561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
146661847f8eSopenharmony_ci   * @static
146761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
146861847f8eSopenharmony_ci   * @atomicservice
146961847f8eSopenharmony_ci   * @since 12
147061847f8eSopenharmony_ci   */
147161847f8eSopenharmony_ci  static cos(n: Value): Decimal;
147261847f8eSopenharmony_ci
147361847f8eSopenharmony_ci  /**
147461847f8eSopenharmony_ci   * Return a new Decimal whose value is the sine of `n`, rounded to `precision` significant digits
147561847f8eSopenharmony_ci   * using rounding mode `rounding`.
147661847f8eSopenharmony_ci   *
147761847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
147861847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
147961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
148061847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
148161847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
148261847f8eSopenharmony_ci   * @static
148361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
148461847f8eSopenharmony_ci   * @atomicservice
148561847f8eSopenharmony_ci   * @since 12
148661847f8eSopenharmony_ci   */
148761847f8eSopenharmony_ci  static sin(n: Value): Decimal;
148861847f8eSopenharmony_ci
148961847f8eSopenharmony_ci  /**
149061847f8eSopenharmony_ci   * Return a new Decimal whose value is the tangent of `n`, rounded to `precision` significant
149161847f8eSopenharmony_ci   * digits using rounding mode `rounding`.
149261847f8eSopenharmony_ci   *
149361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
149461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
149561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
149661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
149761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
149861847f8eSopenharmony_ci   * @static
149961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
150061847f8eSopenharmony_ci   * @atomicservice
150161847f8eSopenharmony_ci   * @since 12
150261847f8eSopenharmony_ci   */
150361847f8eSopenharmony_ci  static tan(n: Value): Decimal;
150461847f8eSopenharmony_ci
150561847f8eSopenharmony_ci  /**
150661847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic cosine of `n`, rounded to precision
150761847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
150861847f8eSopenharmony_ci   *
150961847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
151061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
151161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
151261847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
151361847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
151461847f8eSopenharmony_ci   * @static
151561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
151661847f8eSopenharmony_ci   * @atomicservice
151761847f8eSopenharmony_ci   * @since 12
151861847f8eSopenharmony_ci   */
151961847f8eSopenharmony_ci  static cosh(n: Value): Decimal;
152061847f8eSopenharmony_ci
152161847f8eSopenharmony_ci  /**
152261847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic sine of `n`, rounded to `precision`
152361847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
152461847f8eSopenharmony_ci   *
152561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
152661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
152761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
152861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
152961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
153061847f8eSopenharmony_ci   * @static
153161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
153261847f8eSopenharmony_ci   * @atomicservice
153361847f8eSopenharmony_ci   * @since 12
153461847f8eSopenharmony_ci   */
153561847f8eSopenharmony_ci  static sinh(n: Value): Decimal;
153661847f8eSopenharmony_ci
153761847f8eSopenharmony_ci  /**
153861847f8eSopenharmony_ci   * Return a new Decimal whose value is the hyperbolic tangent of `n`, rounded to `precision`
153961847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
154061847f8eSopenharmony_ci   *
154161847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
154261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
154361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
154461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
154561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
154661847f8eSopenharmony_ci   * @static
154761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
154861847f8eSopenharmony_ci   * @atomicservice
154961847f8eSopenharmony_ci   * @since 12
155061847f8eSopenharmony_ci   */
155161847f8eSopenharmony_ci  static tanh(n: Value): Decimal;
155261847f8eSopenharmony_ci
155361847f8eSopenharmony_ci  /**
155461847f8eSopenharmony_ci   * Return a new Decimal whose value is the arccosine in radians of `n`.
155561847f8eSopenharmony_ci   *
155661847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
155761847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
155861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
155961847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
156061847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
156161847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
156261847f8eSopenharmony_ci   * @static
156361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
156461847f8eSopenharmony_ci   * @atomicservice
156561847f8eSopenharmony_ci   * @since 12
156661847f8eSopenharmony_ci   */
156761847f8eSopenharmony_ci  static acos(n: Value): Decimal;
156861847f8eSopenharmony_ci
156961847f8eSopenharmony_ci  /**
157061847f8eSopenharmony_ci   * Return a new Decimal whose value is the arcsine in radians of `n`, rounded to `precision`
157161847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
157261847f8eSopenharmony_ci   *
157361847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
157461847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
157561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
157661847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
157761847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
157861847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
157961847f8eSopenharmony_ci   * @static
158061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
158161847f8eSopenharmony_ci   * @atomicservice
158261847f8eSopenharmony_ci   * @since 12
158361847f8eSopenharmony_ci   */
158461847f8eSopenharmony_ci  static asin(n: Value): Decimal;
158561847f8eSopenharmony_ci
158661847f8eSopenharmony_ci  /**
158761847f8eSopenharmony_ci   * Return a new Decimal whose value is the arctangent in radians of `n`, rounded to `precision`
158861847f8eSopenharmony_ci   * significant digits using rounding mode `rounding`.
158961847f8eSopenharmony_ci   *
159061847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
159161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
159261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
159361847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
159461847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
159561847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
159661847f8eSopenharmony_ci   * @static
159761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
159861847f8eSopenharmony_ci   * @atomicservice
159961847f8eSopenharmony_ci   * @since 12
160061847f8eSopenharmony_ci   */
160161847f8eSopenharmony_ci  static atan(n: Value): Decimal;
160261847f8eSopenharmony_ci
160361847f8eSopenharmony_ci  /**
160461847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `n`, rounded to
160561847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
160661847f8eSopenharmony_ci   *
160761847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
160861847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
160961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
161061847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
161161847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
161261847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
161361847f8eSopenharmony_ci   * @static
161461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
161561847f8eSopenharmony_ci   * @atomicservice
161661847f8eSopenharmony_ci   * @since 12
161761847f8eSopenharmony_ci   */
161861847f8eSopenharmony_ci  static acosh(n: Value): Decimal;
161961847f8eSopenharmony_ci
162061847f8eSopenharmony_ci  /**
162161847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic sine of `n`, rounded to
162261847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
162361847f8eSopenharmony_ci   *
162461847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
162561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
162661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
162761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
162861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
162961847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
163061847f8eSopenharmony_ci   * @static
163161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
163261847f8eSopenharmony_ci   * @atomicservice
163361847f8eSopenharmony_ci   * @since 12
163461847f8eSopenharmony_ci   */
163561847f8eSopenharmony_ci  static asinh(n: Value): Decimal;
163661847f8eSopenharmony_ci
163761847f8eSopenharmony_ci  /**
163861847f8eSopenharmony_ci   * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `n`, rounded to
163961847f8eSopenharmony_ci   * `precision` significant digits using rounding mode `rounding`.
164061847f8eSopenharmony_ci   *
164161847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal} A value in radians.
164261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
164361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
164461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
164561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
164661847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
164761847f8eSopenharmony_ci   * @static
164861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
164961847f8eSopenharmony_ci   * @atomicservice
165061847f8eSopenharmony_ci   * @since 12
165161847f8eSopenharmony_ci   */
165261847f8eSopenharmony_ci  static atanh(n: Value): Decimal;
165361847f8eSopenharmony_ci
165461847f8eSopenharmony_ci  /**
165561847f8eSopenharmony_ci   * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi
165661847f8eSopenharmony_ci   * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.
165761847f8eSopenharmony_ci   *
165861847f8eSopenharmony_ci   * @param { Value } y {number | string | Decimal} The y-coordinate.
165961847f8eSopenharmony_ci   * @param { Value } x {number | string | Decimal} The x-coordinate.
166061847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
166161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
166261847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
166361847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
166461847f8eSopenharmony_ci   * @throws { BusinessError } 10200060 - Precision limit exceeded.
166561847f8eSopenharmony_ci   * @static
166661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
166761847f8eSopenharmony_ci   * @atomicservice
166861847f8eSopenharmony_ci   * @since 12
166961847f8eSopenharmony_ci   */
167061847f8eSopenharmony_ci  static atan2(y: Value, x: Value): Decimal;
167161847f8eSopenharmony_ci
167261847f8eSopenharmony_ci  /**
167361847f8eSopenharmony_ci   * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,
167461847f8eSopenharmony_ci   * rounded to `precision` significant digits using rounding mode `rounding`.
167561847f8eSopenharmony_ci   *
167661847f8eSopenharmony_ci   * @param { Value[] } n {number | string | Decimal} Decimal
167761847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
167861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
167961847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
168061847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
168161847f8eSopenharmony_ci   * @static
168261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
168361847f8eSopenharmony_ci   * @atomicservice
168461847f8eSopenharmony_ci   * @since 12
168561847f8eSopenharmony_ci   */
168661847f8eSopenharmony_ci  static hypot(...n: Value[]): Decimal;
168761847f8eSopenharmony_ci
168861847f8eSopenharmony_ci  /**
168961847f8eSopenharmony_ci   * Return a new Decimal whose value is the maximum of the arguments.
169061847f8eSopenharmony_ci   *
169161847f8eSopenharmony_ci   * @param { Value[] } n {number | string | Decimal}
169261847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
169361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
169461847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
169561847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
169661847f8eSopenharmony_ci   * @static
169761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
169861847f8eSopenharmony_ci   * @atomicservice
169961847f8eSopenharmony_ci   * @since 12
170061847f8eSopenharmony_ci   */
170161847f8eSopenharmony_ci  static max(...n: Value[]): Decimal;
170261847f8eSopenharmony_ci
170361847f8eSopenharmony_ci  /**
170461847f8eSopenharmony_ci   * Return a new Decimal whose value is the minimum of the arguments.
170561847f8eSopenharmony_ci   *
170661847f8eSopenharmony_ci   * @param { Value[] } n {number | string | Decimal}
170761847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
170861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
170961847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
171061847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
171161847f8eSopenharmony_ci   * @static
171261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
171361847f8eSopenharmony_ci   * @atomicservice
171461847f8eSopenharmony_ci   * @since 12
171561847f8eSopenharmony_ci   */
171661847f8eSopenharmony_ci  static min(...n: Value[]): Decimal;
171761847f8eSopenharmony_ci
171861847f8eSopenharmony_ci  /**
171961847f8eSopenharmony_ci   * Returns a new Decimal with a random value equal to or greater than 0 and less than 1.
172061847f8eSopenharmony_ci   *
172161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
172261847f8eSopenharmony_ci   * @throws { BusinessError } 10200061 - Crypto unavailable
172361847f8eSopenharmony_ci   * @static
172461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
172561847f8eSopenharmony_ci   * @atomicservice
172661847f8eSopenharmony_ci   * @since 12
172761847f8eSopenharmony_ci   */
172861847f8eSopenharmony_ci  static random(): Decimal;
172961847f8eSopenharmony_ci
173061847f8eSopenharmony_ci  /**
173161847f8eSopenharmony_ci   * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with
173261847f8eSopenharmony_ci   * `significantDigits` significant digits (or less if trailing zeros are produced).
173361847f8eSopenharmony_ci   *
173461847f8eSopenharmony_ci   * @param { Value } significantDigits {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.
173561847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
173661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
173761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
173861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
173961847f8eSopenharmony_ci   * @throws { BusinessError } 10200061 - Crypto unavailable
174061847f8eSopenharmony_ci   * @static
174161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
174261847f8eSopenharmony_ci   * @atomicservice
174361847f8eSopenharmony_ci   * @since 12
174461847f8eSopenharmony_ci   */
174561847f8eSopenharmony_ci  static random(significantDigits: number): Decimal;
174661847f8eSopenharmony_ci
174761847f8eSopenharmony_ci  /**
174861847f8eSopenharmony_ci   * Return the sign of the passed value to the method.
174961847f8eSopenharmony_ci   *   1    if x > 0,
175061847f8eSopenharmony_ci   *  -1    if x < 0,
175161847f8eSopenharmony_ci   *   0    if x is 0,
175261847f8eSopenharmony_ci   *  -0    if x is -0,
175361847f8eSopenharmony_ci   *   NaN  otherwise
175461847f8eSopenharmony_ci   *
175561847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
175661847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
175761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
175861847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
175961847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
176061847f8eSopenharmony_ci   * @static
176161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
176261847f8eSopenharmony_ci   * @atomicservice
176361847f8eSopenharmony_ci   * @since 12
176461847f8eSopenharmony_ci   */
176561847f8eSopenharmony_ci  static sign(n: Value): number;
176661847f8eSopenharmony_ci
176761847f8eSopenharmony_ci  /**
176861847f8eSopenharmony_ci   * Return a new Decimal whose value is `n` rounded to an integer using rounding mode `rounding`.
176961847f8eSopenharmony_ci   *
177061847f8eSopenharmony_ci   * @param { Value } n {number | string | Decimal}
177161847f8eSopenharmony_ci   * @returns { Decimal } the Decimal type
177261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
177361847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
177461847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
177561847f8eSopenharmony_ci   * @static
177661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
177761847f8eSopenharmony_ci   * @atomicservice
177861847f8eSopenharmony_ci   * @since 12
177961847f8eSopenharmony_ci   */
178061847f8eSopenharmony_ci  static round(n: Value): Decimal;
178161847f8eSopenharmony_ci
178261847f8eSopenharmony_ci  /**
178361847f8eSopenharmony_ci   * Configures the 'global' settings for this particular Decimal constructor.
178461847f8eSopenharmony_ci   *
178561847f8eSopenharmony_ci   * @param { DecimalConfig } An object with one or more of the following properties,
178661847f8eSopenharmony_ci   *   precision  {number}
178761847f8eSopenharmony_ci   *   rounding   {number}
178861847f8eSopenharmony_ci   *   toExpNeg   {number}
178961847f8eSopenharmony_ci   *   toExpPos   {number}
179061847f8eSopenharmony_ci   *   maxE       {number}
179161847f8eSopenharmony_ci   *   minE       {number}
179261847f8eSopenharmony_ci   *   modulo     {number}
179361847f8eSopenharmony_ci   *   crypto     {boolean|number}
179461847f8eSopenharmony_ci   *   defaults   {true}
179561847f8eSopenharmony_ci   * @returns { void }
179661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
179761847f8eSopenharmony_ci   *                                    1. Incorrect parameter types;
179861847f8eSopenharmony_ci   *                                    2. Parameter verification failed.
179961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of `DecimalConfig.properties` is out of range.
180061847f8eSopenharmony_ci   * @throws { BusinessError } 10200061 - Crypto unavailable
180161847f8eSopenharmony_ci   * @static
180261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
180361847f8eSopenharmony_ci   * @atomicservice
180461847f8eSopenharmony_ci   * @since 12
180561847f8eSopenharmony_ci   */
180661847f8eSopenharmony_ci  static set(config: DecimalConfig): void;
180761847f8eSopenharmony_ci
180861847f8eSopenharmony_ci  /**
180961847f8eSopenharmony_ci   * Rounds away from zero
181061847f8eSopenharmony_ci   *
181161847f8eSopenharmony_ci   * @readonly
181261847f8eSopenharmony_ci   * @static
181361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
181461847f8eSopenharmony_ci   * @atomicservice
181561847f8eSopenharmony_ci   * @since 12
181661847f8eSopenharmony_ci   */
181761847f8eSopenharmony_ci  static readonly ROUND_UP : 0;
181861847f8eSopenharmony_ci
181961847f8eSopenharmony_ci  /**
182061847f8eSopenharmony_ci   * Rounds towards zero
182161847f8eSopenharmony_ci   *
182261847f8eSopenharmony_ci   * @readonly
182361847f8eSopenharmony_ci   * @static
182461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
182561847f8eSopenharmony_ci   * @atomicservice
182661847f8eSopenharmony_ci   * @since 12
182761847f8eSopenharmony_ci   */
182861847f8eSopenharmony_ci  static readonly ROUND_DOWN : 1;
182961847f8eSopenharmony_ci
183061847f8eSopenharmony_ci  /**
183161847f8eSopenharmony_ci   * Rounds towards Infinity
183261847f8eSopenharmony_ci   *
183361847f8eSopenharmony_ci   * @readonly
183461847f8eSopenharmony_ci   * @static
183561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
183661847f8eSopenharmony_ci   * @atomicservice
183761847f8eSopenharmony_ci   * @since 12
183861847f8eSopenharmony_ci   */
183961847f8eSopenharmony_ci  static readonly ROUND_CEILING : 2;
184061847f8eSopenharmony_ci
184161847f8eSopenharmony_ci  /**
184261847f8eSopenharmony_ci   * Rounds towards -Infinity
184361847f8eSopenharmony_ci   *
184461847f8eSopenharmony_ci   * @readonly
184561847f8eSopenharmony_ci   * @static
184661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
184761847f8eSopenharmony_ci   * @atomicservice
184861847f8eSopenharmony_ci   * @since 12
184961847f8eSopenharmony_ci   */
185061847f8eSopenharmony_ci  static readonly ROUND_FLOOR : 3;
185161847f8eSopenharmony_ci
185261847f8eSopenharmony_ci  /**
185361847f8eSopenharmony_ci   * Rounds towards nearest neighbour. If equidistant, rounds away from zero
185461847f8eSopenharmony_ci   *
185561847f8eSopenharmony_ci   * @readonly
185661847f8eSopenharmony_ci   * @static
185761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
185861847f8eSopenharmony_ci   * @atomicservice
185961847f8eSopenharmony_ci   * @since 12
186061847f8eSopenharmony_ci   */
186161847f8eSopenharmony_ci  static readonly ROUND_HALF_UP : 4;
186261847f8eSopenharmony_ci
186361847f8eSopenharmony_ci  /**
186461847f8eSopenharmony_ci   * Rounds towards nearest neighbour. If equidistant, rounds towards zero
186561847f8eSopenharmony_ci   *
186661847f8eSopenharmony_ci   * @readonly
186761847f8eSopenharmony_ci   * @static
186861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
186961847f8eSopenharmony_ci   * @atomicservice
187061847f8eSopenharmony_ci   * @since 12
187161847f8eSopenharmony_ci   */
187261847f8eSopenharmony_ci  static readonly ROUND_HALF_DOWN : 5;
187361847f8eSopenharmony_ci
187461847f8eSopenharmony_ci  /**
187561847f8eSopenharmony_ci   * Rounds towards nearest neighbour. If equidistant, rounds towards even neighbour
187661847f8eSopenharmony_ci   *
187761847f8eSopenharmony_ci   * @readonly
187861847f8eSopenharmony_ci   * @static
187961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
188061847f8eSopenharmony_ci   * @atomicservice
188161847f8eSopenharmony_ci   * @since 12
188261847f8eSopenharmony_ci   */
188361847f8eSopenharmony_ci  static readonly ROUND_HALF_EVEN : 6;
188461847f8eSopenharmony_ci
188561847f8eSopenharmony_ci  /**
188661847f8eSopenharmony_ci   * Rounds towards nearest neighbour. If equidistant, rounds towards Infinity
188761847f8eSopenharmony_ci   *
188861847f8eSopenharmony_ci   * @readonly
188961847f8eSopenharmony_ci   * @static
189061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
189161847f8eSopenharmony_ci   * @atomicservice
189261847f8eSopenharmony_ci   * @since 12
189361847f8eSopenharmony_ci   */
189461847f8eSopenharmony_ci  static readonly ROUND_HALF_CEILING : 7;
189561847f8eSopenharmony_ci
189661847f8eSopenharmony_ci  /**
189761847f8eSopenharmony_ci   * Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity
189861847f8eSopenharmony_ci   *
189961847f8eSopenharmony_ci   * @readonly
190061847f8eSopenharmony_ci   * @static
190161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
190261847f8eSopenharmony_ci   * @atomicservice
190361847f8eSopenharmony_ci   * @since 12
190461847f8eSopenharmony_ci   */
190561847f8eSopenharmony_ci  static readonly ROUND_HALF_FLOOR : 8;
190661847f8eSopenharmony_ci
190761847f8eSopenharmony_ci  /**
190861847f8eSopenharmony_ci   * Not a rounding mode, see modulo
190961847f8eSopenharmony_ci   *
191061847f8eSopenharmony_ci   * @readonly
191161847f8eSopenharmony_ci   * @static
191261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
191361847f8eSopenharmony_ci   * @atomicservice
191461847f8eSopenharmony_ci   * @since 12
191561847f8eSopenharmony_ci   */
191661847f8eSopenharmony_ci  static readonly EUCLIDEAN : 9;
191761847f8eSopenharmony_ci}
191861847f8eSopenharmony_ciexport default Decimal;
1919