From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 87FE83858D32 for ; Mon, 10 Jul 2023 11:42:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87FE83858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6b7206f106cso3546861a34.1 for ; Mon, 10 Jul 2023 04:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688989372; x=1691581372; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eXU2vkhRpCV+CEMaTbNg2toVV6lBNw5Jx92/MMIS2QM=; b=EbuFs08MGKzsnhOBWe+0ucY/QmmqxUXlbIDAk2B38feR6PAOiLvSHezCGG2Jz+3Isf hhBJs3b5uvdgbsVIRrQqEtXqHtk8fvKcwLjJgLeKn/LpdrKf50EMq5Vv5Y2dV29i1eH9 wZVuxU8atTTRXRBDFTM9z7PSuVUcSSM/++fFOOfmCgpOYJTdnLzyAO3x/VODmV+dEQVR GCFQWUAItdm6akV7XhTmGGfHR9uAZXE4RaFE0iSjRbHWFetXd52ZChvEtQ489o3xibu8 /EM0TvLIdO8O0ic8qxv6BV419N9mwthUDXK4UY8IhbSeO9EKqxtaDX+nZeFJoGBs4R1G yoCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688989372; x=1691581372; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eXU2vkhRpCV+CEMaTbNg2toVV6lBNw5Jx92/MMIS2QM=; b=Kn3MmHsZySWxsndmKcl/cpH6IMCStQW0kiRhj5Gw75KuLjhpDJMRdfKA/eXJeB46VB 3plLsJfxK9k5IAzIcA7QDhRPYS18f1KlfTnCf/seWH07QCiS8teCRgiOt0dPoRkVZvlJ czb6ZSFU1VLw7fZInf/md2NlQX7MAkWqcCcHboYVMthWKyYWGeiHaMupp/hhCuw+rq5N riduDRi7k50tahAnCIilqTT/aPQT/C9osd26zvsNyIIFtI34FppO9JpKAObazcYVFETM NXbyQsgjgcwxCb3z2gP2S/8aGDdBgZsN7GVVEK893eZblW5L4k0iIeb/zEd/sntLrEo7 A0ag== X-Gm-Message-State: ABy/qLZqLuitQc7bJhdMy2HrJyPdX4aIlMUc+fV0FcRdPT2ZvI6592pC bkya63PyCmMuCRn1Uu6F7gEcE38qU/gbCmPquDM= X-Google-Smtp-Source: APBJJlHq2yxjGsMn20BAj8YfR2uS24SmidRfV+tnpYM9DU580DGNQBLwBoTX6wu+laEYLFgpe9WZGQW4Xc92Vb8Pl/k= X-Received: by 2002:a05:6870:1cc:b0:1b0:4be9:5f0 with SMTP id n12-20020a05687001cc00b001b04be905f0mr9867643oad.52.1688989372670; Mon, 10 Jul 2023 04:42:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 10 Jul 2023 12:42:40 +0100 Message-ID: Subject: Re: Decimal to floating point and floating point to decimal conversion To: Amit Hiremath Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 10 Jul 2023 at 11:28, Amit Hiremath via Gcc-help wrote: > > Hi, > > Can you please point me to codes in GCC where numbers in human readable > format to floating point and floating point to human readable format > conversion are taking place? For example: 3.2444422 -->404FA4F1-->3.2444422 > > int main () > { > float a; > > a= 3.2444422; > > return 0; > > } > when you generate asm code, the assembler code is converted to 404FA4F1. So > I am looking for a code in the gcc compiler. I think you want the lex_number function in libcpp/lex.cc