From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Ridolfi Subject: [babel] calc var floating point number error Date: Fri, 20 Jul 2012 14:55:53 +0100 (BST) Message-ID: <1342792553.1277.YahooMailNeo@web29802.mail.ird.yahoo.com> Reply-To: Giovanni Ridolfi Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsDgX-0002JK-DW for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 09:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsDgR-0003wf-Bf for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 09:56:01 -0400 Received: from nm22-vm4.bullet.mail.ird.yahoo.com ([212.82.109.254]:45431) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SsDgR-0003wW-0g for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 09:55:55 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Hello everyone,=0A=0AGNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10= on MARVIN=0AOrg-mode version 7.8.11 (eed478ffa @ =0A=0A=0AI have a problem= with babel and calc.=0A=0AI am not able to pass (as variable) floating poi= nt numbers.=A0=0A=0Athis example works:=0A=0A#+BEGIN_SRC calc :var thi=3D20= :var tha=3D90 :var a=3D10 :var rho=3D7854 :var cp=3D434 :var r=3D5=0A=A0th= a -=A0 (tha - thi) * exp((-3.0*a)/(rho*cp*r))=0A#+END_SRC=0A=0A#+RESULTS:= =0A: 20.0001232163=0A=0A=0AHowever var "r" should be 0.05, but if I use suc= h floating point number I got an error:=0A=0A=0A#+NAME sphere=0A#+BEGIN_SRC= calc :var thi=3D20 :var tha=3D90 :var a=3D10 :var rho=3D7854 :var cp=3D434= :var r=3D0.05=0A=A0tha -=A0 (tha - thi) * exp((-3.0*a)/(rho*cp*r))=0A#+END= _SRC=0A=0A#+RESULTS:=0A| 19 | Expected a number |=0A=0AThis behaviour has b= een reported also in SO=0A=0Ahttp://stackoverflow.com/questions/9559221/sim= ple-math-results-in-an-emacs-org-mode-file-with-babel=0A=0A=0Acheers,=0AGio= vanni=0A