From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: babel C, C++, D enhancement Date: Mon, 16 Jun 2014 20:28:04 +0200 Message-ID: <878uowpv4b.fsf@Rainer.invalid> References: <878urc0zmw.fsf@bzg.ath.cx> <874n1ryeq1.fsf@bzg.ath.cx> <87y4xgxu74.fsf@Rainer.invalid> <87r438uycj.fsf@bzg.ath.cx> <538BA215.2050305@free.fr> <877g4uezak.fsf@gmail.com> <5394C55B.7010906@free.fr> <87tx7vq955.fsf@gmail.com> <87ha3p8fq9.fsf@Rainer.invalid> <539B762F.90406@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwbdm-0000WQ-LN for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 14:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwbdf-0004ct-OC for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 14:28:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:47861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwbdf-0004cf-IN for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 14:28:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wwbde-0005GS-Kg for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 20:28:14 +0200 Received: from pd9eb1a44.dip0.t-ipconnect.de ([217.235.26.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2014 20:28:14 +0200 Received: from Stromeko by pd9eb1a44.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2014 20:28:14 +0200 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: emacs-orgmode@gnu.org Thierry Banel writes: > So Babel C++ may cause problem for large integers. > I am not sure how we can fix this in any case. You'd need to know INT_MAX and give an error for larger values or use an integral type that is large enough to handle Emacs' integer (which would most likely be necessary for any Emacs that uses wide integer). > In the meantime, we can force large values to be declared as doubles by > adding dot zero > like this: > > #+BEGIN_SRC C++ :var large=9876543210 .0 > printf ("%g", large); > #+END_SRC That will lose precision, so it may not be the right thing either. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada