HP PPL and Statistical distributions
05-23-2021, 03:36 PM (This post was last modified: 05-25-2021 12:35 PM by Albert Chan.)
Post: #23
 Albert Chan Senior Member Posts: 2,231 Joined: Jul 2018
RE: HP PPL and Statistical distributions
(05-23-2021 02:00 PM)C.Ret Wrote:  The last time I was told about the properties of complex numbers field, there were no order relation available for it.

Therefore, no one may attempt a comparison between any complex number nor between a complex number and a real !

It was not about comparing 2 complex numbers, but against a "symbolic" infinity.
My guess symbolic infinity is defined bigger than any finite values, independent of type.

The issue is this line in quad:

< IF bool(a>b) == bool(mode==2) THEN d:=-d END

My patch to extend to complex numbers (which turned out not needed in PPL)
// If integration limits are [a, -inf] or [-inf, b], switch direction of integration.

> IF (mode==2 AND b<0) OR (mode==1 AND a<0) THEN d:=-d END

But, you do have a point.
Patch is more readable, and less reliance on PPL "feature" (which might changed in the future).

I am patching this to quad. Thanks, C.Ret

Update1: replace indirect (mode!=2) as (mode==1)
Update2: replace complicated test with simpler equivalent code

< IF mode == 2 THEN c:=a ELSE c:=b END
< IF (mode==2 AND b<0) OR (mode==1 AND a<0) THEN d:=-d END
< s := f(c+d)

> c, s := a, b; // c = finite edge
> IF mode == 1 THEN c, s := b, a END
> IF s < 0 THEN d:=-d END
> s := f(c+d)
 « Next Oldest | Next Newest »

 Messages In This Thread HP PPL and Statistical distributions - robmio - 04-11-2021, 08:49 AM RE: HP PPL and Statistical distributions - robmio - 04-11-2021, 09:51 AM RE: HP PPL and Statistical distributions - compaqdrew - 04-13-2021, 05:43 AM RE: HP PPL and Statistical distributions - robmio - 04-13-2021, 08:45 AM RE: HP PPL and Statistical distributions - compaqdrew - 04-13-2021, 08:18 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-18-2021, 03:38 PM RE: HP PPL and Statistical distributions - robmio - 05-18-2021, 05:23 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-18-2021, 11:15 PM RE: HP PPL and Statistical distributions - robmio - 05-18-2021, 06:03 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-19-2021, 02:39 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-19-2021, 04:56 PM RE: HP PPL and Statistical distributions - robmio - 05-19-2021, 06:00 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-19-2021, 06:35 PM RE: HP PPL and Statistical distributions - robmio - 05-19-2021, 07:05 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-20-2021, 12:40 PM RE: HP PPL and Statistical distributions - robmio - 05-20-2021, 04:10 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-22-2021, 12:50 PM RE: HP PPL and Statistical distributions - robmio - 05-22-2021, 05:18 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-22-2021, 06:46 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-23-2021, 01:32 PM RE: HP PPL and Statistical distributions - C.Ret - 05-23-2021, 02:00 PM RE: HP PPL and Statistical distributions - robmio - 05-23-2021, 01:43 PM RE: HP PPL and Statistical distributions - Albert Chan - 05-23-2021 03:36 PM

User(s) browsing this thread: 1 Guest(s)