all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [babel] calc var floating point number error
@ 2012-07-20 13:55 Giovanni Ridolfi
  2012-07-20 14:34 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Ridolfi @ 2012-07-20 13:55 UTC (permalink / raw)
  To: Orgmode

Hello everyone,

GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
Org-mode version 7.8.11 (eed478ffa @ 


I have a problem with babel and calc.

I am not able to pass (as variable) floating point numbers. 

this example works:

#+BEGIN_SRC calc :var thi=20 :var tha=90 :var a=10 :var rho=7854 :var cp=434 :var r=5
 tha -  (tha - thi) * exp((-3.0*a)/(rho*cp*r))
#+END_SRC

#+RESULTS:
: 20.0001232163


However var "r" should be 0.05, but if I use such floating point number I got an error:


#+NAME sphere
#+BEGIN_SRC calc :var thi=20 :var tha=90 :var a=10 :var rho=7854 :var cp=434 :var r=0.05
 tha -  (tha - thi) * exp((-3.0*a)/(rho*cp*r))
#+END_SRC

#+RESULTS:
| 19 | Expected a number |

This behaviour has been reported also in SO

http://stackoverflow.com/questions/9559221/simple-math-results-in-an-emacs-org-mode-file-with-babel


cheers,
Giovanni


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-25 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 13:55 [babel] calc var floating point number error Giovanni Ridolfi
2012-07-20 14:34 ` Eric Schulte
2012-07-25 15:32   ` Eric Schulte

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.