From nobody Sun Mar 12 13:12:24 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PZKvX2rfLz3xrxT for ; Sun, 12 Mar 2023 13:12:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PZKvX0Mlkz3Hyl for ; Sun, 12 Mar 2023 13:12:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678626744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8tG4PQXXKu0VaIdWw/2yrZ8X8qyAvS4J8c3CmHFCt9U=; b=DIz2M4KDf27D4W88YQc8ngeWvtEBDFZyPGYYxGkYPA276aiSBixWtWhBcfE+L50KAmZ9OJ NUYQxhXA4Pot4I9QN8bAJUyebKLh0Bm/zyER+9N8GfGDr+58g0ne8cIMQzK81QKym+Hy6Y sFyt3w5Qk3QiiIXn85hI6J+ds21eHdtGfHi3F56ipe4OJHtsRSuLvYyN96okye7l+hWMCc b148lVkNJv1zN0PvEk+3PPhI7Nd4GzWXM/sHXdtIpGPKcAH8E+XpIDJtZgicF2WCg1syUR s7jQwd/B4DefxgC5nyigmYtDYvGmhvqsmpap2YqsHYxzBcriIy+8IC/rX/0AJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678626744; a=rsa-sha256; cv=none; b=MHN1ZPwhwEEibHTIIGSQzc4lc7xZVd2yZtUDNvf7xL4T0yPBiy6AgDtHUfCqNJUzLWBpVD A212TaXBsQzmIyr1xkif3fOZetO+NsdE3RMRsFMhkeX2gRCDN7zgRwEQ89BFc5hobVhILC mtHToBSXdcoNDlqz2KKbKEBeAaMEy6pHZUG3MWeWxCjlc4lTaTuIR/oPW0PJbajx0KDa34 G5WdXyvne3nXnfsmTG/STAUQEnKY/+LShHdwLO8U6k6I/pXr0PCS2WYoeaf7wGA4I0Jg71 9M4k0CRJA9Yk7mx+xaXecQGxsG07OpQnZN66x97p+S2n4Vec0XIbek9nYxkAYQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PZKvW6YQ7z1CL3 for ; Sun, 12 Mar 2023 13:12:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 32CDCNcn033989 for ; Sun, 12 Mar 2023 13:12:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32CDCNBG033988 for bugs@FreeBSD.org; Sun, 12 Mar 2023 13:12:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270154] bc freezes evaluating cbrt(0.01) Date: Sun, 12 Mar 2023 13:12:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: igor@kolesnik.es X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270154 Bug ID: 270154 Summary: bc freezes evaluating cbrt(0.01) Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: igor@kolesnik.es bin/bc enters an infinite loop while evaluating the cube-root of 0.01 bin/bc -l -e 'cbrt(0.1)' returns .46415888336127788924 (which is expected) bin/bc -l -e 'cbrt(0.01)' freezes Looking at the definition of root(x,n) in lib2.bc the following loop never exits while(r!=3Dq){ r=3Dq q=3D(p*r+x/r^p)/n } A simple hack makes the cbrt function working. while(abs(r-q)>0.000001){ r=3Dq q=3D(p*r+x/r^p)/n } --=20 You are receiving this mail because: You are the assignee for the bug.=