emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to avoid 0.0 in an org-table


From: Uwe Brauer
Subject: Re: how to avoid 0.0 in an org-table
Date: Wed, 07 Jul 2021 08:50:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "RM" == Roger Mason <rmason@mun.ca> writes:

> Hello Uwe,
> Uwe Brauer writes:

>> I obtain 0.0 in the last column, this looks bad, any idea how to avoid
>> it?

> I think you can use a printf format specification in the formula.

Thanks I tried

#+begin_src elisp
|     |    |   |   |  Res | Min |
|-----+----+---+---+------+-----|
|   0 |  0 | 0 | 0 |    0 | 0.0 |
| 1.2 | 10 | 1 | 1 | 13.2 | 0.1 |
#+TBLFM: $5=vsum($1..$4);f1::$6=min(10,$4)*0.1;f1 E
#+end_src

#+begin_src elisp
|     |    |   |   |  Res | Min |
|-----+----+---+---+------+-----|
|   0 |  0 | 0 | 0 |    0 |   0.0 |
| 1.2 | 10 | 1 | 1 | 13.2 |   0.1 |
#+TBLFM: $5=vsum($1..$4);f1::$6=min(10,$4)*0.1;%0.1f
#+end_src


But it does not change, it seems if I want 0.1 I have to pay the price
to also obtain 0.0.

Regards

Uwe 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]