From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 170137FCE9 for ; Wed, 25 Jan 2017 11:42:56 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jacques-henri.jourdan@normalesup.org; spf=Neutral smtp.mailfrom=jacques-henri.jourdan@normalesup.org; spf=None smtp.helo=postmaster@ulminfo.fr Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jacques-henri.jourdan@normalesup.org) identity=pra; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; x-conformance=sidf_compatible Received-SPF: Neutral (mail3-smtp-sop.national.inria.fr: domain of jacques-henri.jourdan@normalesup.org does not assert whether or not 5.135.188.139 is permitted sender) identity=mailfrom; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@ulminfo.fr) identity=helo; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="postmaster@ulminfo.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AdVpp+B0+P1KneQzFsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seIeKfad9pjvdHbS+e9qxAeQG96Kt7QZ0KGP7OjJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fdbghMizexe7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aYnL3W6?= =?us-ascii?q?Mn+hk6DpinBMHNXNODmruEiQWyFYRLa3sDKl2KC3agVYKZQfsFbmrGIMZqiyEJ?= =?us-ascii?q?Tv2hRok71FessxLgx7NhBuzT4CgRsZ/4ycAz4Pfcw0JhvQdoBtiQhjneB1p/mX?= =?us-ascii?q?kFEmJu0Q=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A6KwBjgIhYZIu8hwVeHAEFAQsBGAYMg?= =?us-ascii?q?wwBAQEBAR9gKoQzm3IflzsmhXwCCIIhQxQBAQEBAQEBAQEBAQNSNIIzCgeCJgE?= =?us-ascii?q?FIxVRCxgCAiYCAlcTCAKJGASuK4Ilil8BAQgCASAFgQuHRQiCYoUVgjqCXwWbT?= =?us-ascii?q?oZllT+GPpJ6NiA5YBMqQ4Y6iR4BAQE?= X-IPAS-Result: =?us-ascii?q?A0A6KwBjgIhYZIu8hwVeHAEFAQsBGAYMgwwBAQEBAR9gKoQ?= =?us-ascii?q?zm3IflzsmhXwCCIIhQxQBAQEBAQEBAQEBAQNSNIIzCgeCJgEFIxVRCxgCAiYCA?= =?us-ascii?q?lcTCAKJGASuK4Ilil8BAQgCASAFgQuHRQiCYoUVgjqCXwWbToZllT+GPpJ6NiA?= =?us-ascii?q?5YBMqQ4Y6iR4BAQE?= X-IronPort-AV: E=Sophos;i="5.33,283,1477954800"; d="scan'208";a="210844469" Received: from ulminfo.fr ([5.135.188.139]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Jan 2017 11:42:55 +0100 Received: from [139.19.168.39] (wks-50-28.mpi-sws.org [139.19.168.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ulminfo.fr (Postfix) with ESMTPSA id A77F4C08D1 for ; Wed, 25 Jan 2017 11:42:54 +0100 (CET) To: caml-list@inria.fr References: <446a88a3-1e93-91a1-0111-f71a8aa24ec2@prepas.org> From: Jacques-Henri Jourdan Message-ID: Date: Wed, 25 Jan 2017 11:42:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <446a88a3-1e93-91a1-0111-f71a8aa24ec2@prepas.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Integer exponentiation and ** Hi, Concerning integer exponentiation: integers in OCaml are bounded, and not meant to compute over large integers. This means that exponentiation will in practice overflow very quickly, and, anyway, there is no hardware support for exponentiation (meaning that it would be slower than expected). There are two alternatives : if the base is 2, you can use bitwise shifts, and, in any case, you can use a large integers library such as ZArith (1). Concerning the syntax for floating point exponentiation: I agree that it is not coherent. I guess that's a matter of taste (as always with syntax): some prefer typing 2 characters instead of 3. I honestly do not know if there is any other reason.You can still define the other syntax: let ( **. ) = ( ** );; -- JH (1) https://github.com/ocaml/Zarith On 01/24/2017 09:23 AM, Yann Salmon wrote: > Hello, > > I am wondering why OCaml does not have an integer exponentiation > operator and why the floating point exponentiation operator is ( ** ) > and not ( **. ). > > Any ideas ? >