# Significant digits in integer numbers

**URL:** <https://community.wolfram.com/t/significant-digits-in-integer-numbers/5700>\
**Category:** Questions\
**Created:** [May 14, 2015, 11:46am UTC](https://community.wolfram.com/t/significant-digits-in-integer-numbers/5700 "2015-05-14T11:46:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andersongaudio](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/andersongaudio/32/17298_2.png) [@andersongaudio](https://community.wolfram.com/u/andersongaudio)\
**Post date:** [May 14, 2015, 11:46am UTC](https://community.wolfram.com/t/significant-digits-in-integer-numbers/5700/1 "2015-05-14T11:46:46Z")

</div>

Hi,

This seems to be a silly question, but I was not able to find an easy solution. I have an integer number which I must show as a currency. For example:

```
NumberForm[1738517, {1, 2}, DigitBlock -> 3]

```

How can I proceed to get this number to just one significant figure and still keeping the currency format (2,000,000.00)?

---

<div class="post-metadata">

**Author:** ![paul2cleary](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@paul2cleary](https://community.wolfram.com/u/paul2cleary)\
**Post date:** [May 14, 2015, 1:00pm UTC](https://community.wolfram.com/t/significant-digits-in-integer-numbers/5700/2 "2015-05-14T13:00:24Z")

</div>

Hi

This will do it

```
NumberForm[Ceiling[1738517, 10^(IntegerLength[1738517] - 1)], {1, 2}, 
 DigitBlock -> 3]

```

The Ceiling function is the one to get it to n significant digits like

```
In[9]:= Ceiling[1738517, 1000000]

Out[9]= 2000000

```

You will need some means of identifying how many digits are in the number before hand, easy enough if the actual number is a variable.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![andersongaudio](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/andersongaudio/32/17298_2.png) [@andersongaudio](https://community.wolfram.com/u/andersongaudio)\
**Post date:** [May 14, 2015, 2:25pm UTC](https://community.wolfram.com/t/significant-digits-in-integer-numbers/5700/3 "2015-05-14T14:25:21Z")

</div>

Dear Paul,

Thank you very much. This solved the problem. I just had to replace `Ceiling` by `Round` in order to correctly handle rounding.

Regards,  
Anderson
