public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Willy Tarreau <w@1wt.eu>,
	linux-kernel@vger.kernel.org, Cheng Li <lechain@gmail.com>
Subject: Re: [PATCH v2 next] tools/nolibc: Optimise and common up the number to ascii functions
Date: Mon, 16 Feb 2026 22:16:20 +0000	[thread overview]
Message-ID: <20260216221620.449678f4@pumpkin> (raw)
In-Reply-To: <5e0ce1ac-a5a8-4a3b-ad11-97d2cf6076bc@t-8ch.de>

On Mon, 16 Feb 2026 19:46:12 +0100
Thomas Weißschuh <linux@weissschuh.net> wrote:

> On 2026-02-13 11:08:59+0000, David Laight wrote:
> > On Sun,  8 Feb 2026 19:53:08 +0000
> > david.laight.linux@gmail.com wrote:
> >   
> > > From: David Laight <david.laight.linux@gmail.com>
> > > 
> > > Implement u[64]to[ah]_r() using a common function that uses multiply
> > > by reciprocal to generate the least significant digit first and then
> > > reverses the string.  
> > 
> > Self-nak on this version :-(
> > 
> > The division code can end up generating a negative remainder for
> > very large values (probably only ones over 1<<63).  
> 
> Ok. Maybe some tests for these edgecases are in order, too.
> Do you want to add them?

The problem is I'm not sure how to decide where they are.
The v1 patch is fine, it expects to get a large remainder and then
fixes up the error.
I could make the code just work for 8, 10 and 16 - but that is 'wimping out'.

	David

> 
> 
> Thomas


  reply	other threads:[~2026-02-16 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08 19:53 [PATCH v2 next] tools/nolibc: Optimise and common up the number to ascii functions david.laight.linux
2026-02-13 11:08 ` David Laight
2026-02-16 18:46   ` Thomas Weißschuh
2026-02-16 22:16     ` David Laight [this message]
2026-02-17 12:01       ` David Laight

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=20260216221620.449678f4@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=lechain@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=w@1wt.eu \
    /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