From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH] APE: add ceilf, fabsf and lroundf
Date: Sun, 14 Feb 2021 17:25:33 -0800 [thread overview]
Message-ID: <193B308EAA365F2DE0ACD7BC44444475@eigenstate.org> (raw)
In-Reply-To: <C6041E57683E33D19EE739FAD678A37C@gmail.com>
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)?
prev parent reply other threads:[~2021-02-15 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 9:04 telephil9
2021-02-15 1:25 ` ori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=193B308EAA365F2DE0ACD7BC44444475@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).