From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15591 invoked from network); 15 Feb 2021 01:33:00 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 15 Feb 2021 01:33:00 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 1ess; Sun Feb 14 20:25:44 -0500 2021 Received: from abbatoir.fios-router.home (pool-74-101-2-6.nycmny.fios.verizon.net [74.101.2.6]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 2abb473d (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sun, 14 Feb 2021 17:25:35 -0800 (PST) Message-ID: <193B308EAA365F2DE0ACD7BC44444475@eigenstate.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: 9front@9front.org Date: Sun, 14 Feb 2021 17:25:33 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: information-based browser-aware GPU deep-learning backend Subject: Re: [9front] [PATCH] APE: add ceilf, fabsf and lroundf Reply-To: 9front@9front.org Precedence: bulk Quoth telephil9@gmail.com: > i, > > Here is a patch to add ceilf, fabsf and lroundf to APE math library. > These functions are needed for the netsurf port. > > Source code was copied from sourceware newlib. Looking at implementations from various OSes, I see that OpenBSD uses these exact same versions copied from the same sources. > > > + > +float > +ceilf(float x) > > +float > +fabsf(float x) These two have a lot more bit twiddling than I'd like; we've got versios that work on the floating point values for doubles; it should be straightforward to convert them over to floats: mostly a matter of suffixing the functions in those files with an 'f'. > diff -r ce98610ce572 sys/src/ape/lib/ap/math/lroundf.c > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/sys/src/ape/lib/ap/math/lroundf.c Sun Feb 14 10:02:40 2021 +0100 This one is.. still more twiddling than I'd like, but it looks ok; while we're here, can we add lround(double)?