---
title: "init(mantissa:exponent:isNegative:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsdecimalnumber/init(mantissa:exponent:isnegative:)"
---

# init(mantissa:exponent:isNegative:)

Initializes a decimal number using the given mantissa, exponent, and sign.

## Declaration

```swift
convenience init(mantissa: UInt64, exponent: Int16, isNegative flag: Bool)
```

## Parameters

- `mantissa`: The mantissa for the new decimal number object.
- `exponent`: The exponent for the new decimal number object.
- `flag`: A Boolean value that specifies whether the sign of the number is negative.

## Return Value

Return Value An NSDecimalNumber object initialized using the given mantissa, exponent, and sign.

## Discussion

Discussion The arguments express a number in a type of scientific notation that requires the mantissa to be an integer. So, for example, if the number to be represented is 1.23, it is expressed as 123x10^–2—mantissa is 123; exponent is –2; and isNegative, which refers to the sign of the mantissa, is false.

## See Also

### Initializing a Decimal Number

- [init(decimal:)](foundation/nsdecimalnumber/init(decimal:).md)
- [init(string:)](foundation/nsdecimalnumber/init(string:).md)
- [init(string:locale:)](foundation/nsdecimalnumber/init(string:locale:).md)
