> For the complete documentation index, see [llms.txt](https://supernova-developers.gitbook.io/supernova-dsm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://supernova-developers.gitbook.io/supernova-dsm/pulsar-language/transformers/numeric-transformers.md).

# Numeric Transformers

Numeric transformers can be used on the source type of `Number` - `Int`, `Float` or `Double`. Following transformers are available:

## `addedBy`

Returns result of the addition of the source and `value`. `value` is considered `Double`.

* Usage: `.addedBy(value)`
* Example usage: `value.addedBy(15.5)`
* Example return: `10` to `25.5`&#x20;

## `dividedBy`

Returns result of the division of the source and `value`. `value` is considered `Double`. Note: Division by zero is handled gracefully, produces zero, and doesn't throw an error.

* Usage: `.dividedBy(value)`
* Example usage: `value.dividedBy(2.5)`
* Example return: `5` to `2`&#x20;

## `multipliedBy`

Returns result of multiplication of the source and `value`. `value` is considered `Double`.

* Usage: `.multipliedBy(value)`
* Example usage: `value.multipliedBy(4)`
* Example return: `2` to `8`&#x20;

## `subtractedBy`

Returns result of subtraction of the source and `value`. `value` is considered `Double`.

* Usage: `.subtractedBy(value)`
* Example usage: `value.subtractedBy(2)`
* Example return: `25` to `23`&#x20;

## `rounded`

Returns the source rounded to specified number of fractions. `value` must be `Int`.

* Usage: `.rounded(fractions)`
* Example usage: `value.rounded(1)`
* Example return: `1.11` to `1` or `1.16` to `1.2`&#x20;

## `ceiled`

Returns the next highest `Int` by rounding up the source if necessary.

* Usage: `.ceiled()`
* Example usage: `value.ceiled()`
* Example return: `1.78` to `2` or `-3.14` to `-3`&#x20;

## `floored`

Returns the next lowest `Int` by rounding up the source if necessary.

* Usage: `.floored()`
* Example usage: `value.floored()`
* Example return: `1.78` to `1` or `-3.14` to `-4`&#x20;

## `absolute`

Returns absolute source

* Usage: `.default(value)`
* Example usage: `value.default("Empty")`
* Example return: `` ` to ``Empty\`&#x20;

## `positive`

Returns the source that is either the same if it was `>0`, or multiplied by `-1` if it was `<0`.

* Usage: `.positive()`
* Example usage: `value.positive()`
* Example return: `-1` to `1` or `2` to -2\`&#x20;

## `negative`

Returns the source that is either the same if it was `<0`, or multiplied by `-1` if it was `>0`.

* Usage: `.negative()`
* Example usage: `value.negative()`
* Example return: `1` to `-1` or `-2` to `-2`&#x20;

## `formatDate`

Returns formatted date. The source must be `Int`  holding value of standard time interval since 1970 (Unix epoch time).

* Usage: `.formatDate(format)`
* Example usage: `value.formatDate("YYYY-MM-DD")`
* Example return: `1587490511` to `2020-04-21`
