Re: [PATCH] Add arithmetic builtin functions

2024-12-26 Thread Paul Smith
On Mon, 2024-12-09 at 17:18 -0800, Pete Dietl wrote: > Here is a bit of test code I came up with. Do you think this is > necessary and or the right approach for testing with extreme values > of double and long long? I think the idea of setting values in config-flags.pm.in is correct, just to keep

Re: [PATCH] Add arithmetic builtin functions

2024-12-19 Thread Pete Dietl
* Poke * On Mon, Dec 9, 2024, 5:18 PM Pete Dietl wrote: > I could also use some help with autotools and the Perl test scripts < > I am a novice at both :) > > > Here is a bit of test code I came up with. Do you think this is > necessary and or the right approach for testing with extreme values o

Re: [PATCH] Add arithmetic builtin functions

2024-12-09 Thread Pete Dietl
I could also use some help with autotools and the Perl test scripts < I am a novice at both :) > Here is a bit of test code I came up with. Do you think this is necessary and or the right approach for testing with extreme values of double and long long? >From 4a6e84061fbf2180cf4efec45a215dd8af648

Re: [PATCH] Add arithmetic builtin functions

2024-12-09 Thread Paul Smith
On Mon, 2024-12-09 at 01:49 -0800, Pete Dietl wrote: > Mon, 9 Dec 2024 10:37:14 +0100, Jouke Witteveen wrote: > > What I remember from the original thread is that we first needed a > > good proposal. I'm afraid the existence of the implementation > > suggested now sidesteps the discussion on what f

Re: [PATCH] Add arithmetic builtin functions

2024-12-09 Thread Pete Dietl
Jouke, Wed, 20 May 2020 13:42:11 -0400, Paul Smith wrote: > > Another option would be to introduce some new syntax like $(()), > > but that might break existing Makefiles and would probably be more > > work, though it looks cleaner IMO. > No, I don't agree with that. Trying to change the base ma

Re: [PATCH] Add arithmetic builtin functions

2024-12-09 Thread Jouke Witteveen
On Mon, Dec 9, 2024 at 12:11 AM Paul Smith wrote: > I reviewed the previous (lengthy) email thread before looking at this > patch. I guess you mean the thread that at some point was titled "math expressions" [1]. Was there any conclusion there? At some point it gravitated to a shell/Posix-style e

Re: [PATCH] Add arithmetic builtin functions

2024-12-09 Thread Pete Dietl
rom: Pete Dietl > > Date: Fri, 29 Nov 2024 03:57:06 -0800 > > Subject: [PATCH] Add arithmetic builtin functions > > > > --- > > src/function.c | 401 > > - > > 1 file changed, 400 insertions(+), 1 deletion(-

Re: [PATCH] Add arithmetic builtin functions

2024-12-08 Thread Paul Smith
l wrote: > From 76db129404896c15440b405949b8c830e7ebb98f Mon Sep 17 00:00:00 > 2001 > From: Pete Dietl > Date: Fri, 29 Nov 2024 03:57:06 -0800 > Subject: [PATCH] Add arithmetic builtin functions > > --- >  src/function.c | 401 > - >  1 file changed, 400

Re: [PATCH] Add arithmetic builtin functions

2024-12-08 Thread Paul Smith
I apologize for my tardiness in reviewing this patch; it's been a busy few weeks here. On Fri, 2024-11-29 at 12:31 -0800, Pete Dietl wrote: > > Not sure about such inline 'structs'. > > These are called "compound literals" and have been part of C since > C99. > More broadly though, what is the n

Re: [PATCH] Add arithmetic builtin functions

2024-11-29 Thread Pete Dietl
Gisle Vanem wrote: > > +#define generic_math_op(a, b, op) > >\ > > + ((void)sizeof ( > >\ > > + char[__builtin_types_compatible_p (typeof (a), typeof (b)) ? 1 : > > -1]), \ > > + _G

Re: [PATCH] Add arithmetic builtin functions

2024-11-29 Thread Gisle Vanem
Pete Dietl wrote: Here I submit to you a patch that adds the following builtin functions to make: `add` (addition), `sub` (subtraction), `mul` (multiplication), `div` (division), `mod` (modulus), `max` (maximum), `min` (minimum), and `abs` (absolute value). The implementation I provide supports

[PATCH] Add arithmetic builtin functions

2024-11-29 Thread Pete Dietl
you all think. >From 76db129404896c15440b405949b8c830e7ebb98f Mon Sep 17 00:00:00 2001 From: Pete Dietl Date: Fri, 29 Nov 2024 03:57:06 -0800 Subject: [PATCH] Add arithmetic builtin functions --- src/function.c | 401 - 1 file changed,