GeneralRounding BEFORE the decimal sign

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
zer0nimo
Posts: 12
Joined: Wed Jul 29, 2009 3:20 am

Rounding BEFORE the decimal sign

Post by zer0nimo »

Hi Folks,

I have a problem creating rounded numbers before the decimal sign ... though I did it once before I can't remember nor figure out, how this works :(

What I want is:
  • Given Number: 120000
    Displayed: 120.0
I'm using \numprint, but can only round after a decimal sign :(

Thank you very much for any help !!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Rounding BEFORE the decimal sign

Post by josephwright »

Do you want "negative" decimal places, or perhaps you want significant figures? It the later, you could use siunitx to do it.
Joseph Wright
zer0nimo
Posts: 12
Joined: Wed Jul 29, 2009 3:20 am

Rounding BEFORE the decimal sign

Post by zer0nimo »

Sry, I don't really get what you mean ^^

I need to display the numbers in a shorter form in a tabular, where the information is given "all numbers in thousand" ...

Again an example:
  • Inside the LaTeX document I give a number like: 23560
    In the PDF file it should show: 23.6
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Rounding BEFORE the decimal sign

Post by gmedina »

Hi,

first thing that comes to my mind (I haven't done any tests): use the fltpoint package (for example) to divide numbers by 1000 and then round them.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply