HP Forums

Full Version: Plus42 Equations, Preview Release
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
(03-30-2022 10:38 PM)Albert Chan Wrote: [ -> ]
(03-30-2022 08:01 PM)Thomas Okken Wrote: [ -> ]Hmmm... for all integer exponents?

Python limited integer squaring to +/- 100, "normal" complex pow beyond that.
source: complexobject.c, static Py_complex c_powi(Py_complex x, long n)

This is Python 2.6 (newer version is similar)

>>> z = 3+4j
>>> z100 = z**100
>>> abs(z - z**101/z100), abs(z - z100/z**99)
(2.4565801279300335e-14, 9.9301366129890925e-16)
>>>
>>> z = 4+5j
>>> z100 = z**100
>>> abs(z - z**101/z100), abs(z - z100/z**99)
(1.7680105590573434e-14, 0.0)

Here's what the later version looks like:
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> z = 3+4j
>>> z100=z**100
>>> abs(z - z**101/z100), abs(z - z100/z**99)
(4.631533241295194e-14, 9.930136612989092e-16)
>>>
>>> z = 4+5j
>>> z100 = z**100
>>> abs(z - z**101/z100), abs(z - z100/z**99)
(1.855102611454866e-14, 0.0)
>>>
I think I must not have been fully awake anymore last night when I read Albert's post because I managed to miss the part where the repeated squaring is only applied for exponents between -100 and +100. But I did look at the c_powi() function in complexobject.c, and I don't see any such limit there, and that's the example I followed (which basically meant rolling back my last few commits, since repeated squaring for all integer exponents (or rather, in the range +-(2^31-1)) is what it used to do before I started tinkering with it.
(03-31-2022 08:35 AM)Thomas Okken Wrote: [ -> ]But I did look at the c_powi() function in complexobject.c, and I don't see any such limit there ...

On Python 2.6 source (the one I peeked), ±100 limit is in powi()
On latest version, ±100 limit is in complex_pow()

Sorry for the confusion.
Ah, OK. So I was thinking along the same lines with my initial tweak, then. Except I used 100 hexadecimal. :-D

It sounds like I should just restore that version then, that is, change the limit back to +-256. That specific number has the advantage that it guarantees exact results in all cases where that is possible; the highest exponent where it is still possible to get exact results with a non-trivial base, in the decimal version, is 225, as in (1+i)^225. (In the binary version, it's 107.)
Actually, 1+i is a bad example for the binary version, since this is a number that can be raised to any integer power with exact results, 1+i being the square root of 2i. You could argue that all the numbers (-1|0|1)+(-1|0|1)i should be handled as special cases in binary...
New update:

1. For Y^X with complex Y and integer X: use repeated squaring only if X between -256 and 256, as discussed above.
2. Fixed loading of skin GIFs with local colormaps. This was broken in the Windows, MacOS, and iOS versions. Note that among the skins in the collection on my web site, only mimax3 appears to have this format, but files like that can also be generated by recent versions of Microsoft Paint and Paint.NET. (Plus42 inherited this bug from Free42. It will be fixed in Free42 as well, in the next release.)
I saw the Plus42 repository is gone from Github, so is there going to be a Play store release soon?
Hi, johanw

It is still here, https://github.com/thomasokken/plus42desktop

However, the issue I posted about solving NMPT=0, instead of NPV=0, is gone.

Is it possible to move the issue, to the new repository ?
Your code used my idea, tvm_eq(), but with issue gone, it does not explain why.
(04-05-2022 02:39 PM)Albert Chan Wrote: [ -> ]It is still here, https://github.com/thomasokken/plus42desktop

That is only the desktop code. Fortunately I have a clone.

Quote:However, the issue I posted about solving NMPT=0, instead of NPV=0, is gone.

Is it possible to move the issue, to the new repository ?

AFAIK you can not transfer issues from one repository to another. You'll have to recreate them and re-link the issues to the comments.

But I'm not sure if the Plus42 repository is removed or just set to private. If the later all can be found back eventually.
I just set it private. I want to keep the Android- and iOS-specific parts closed source until the apps have been out for a year. The plus42desktop repository is a snapshot of plus42 with the Android and iOS parts removed; I'll keep it in sync with plus42 so people can see what's in the core and can still build the desktop versions.

See https://github.com/thomasokken/plus42des...ID_AND_IOS

Sorry about the missing issues! It was either that, or do some extremely ugly stuff to remove 'android' and 'iphone' from the plus42 repo with all their history. Since this is only going to be temporary, it seemed like a reasonable alternative.

(04-05-2022 01:36 PM)johanw Wrote: [ -> ]I saw the Plus42 repository is gone from Github, so is there going to be a Play store release soon?

That's the plan, but I can't give a date yet.
(04-05-2022 06:05 PM)Thomas Okken Wrote: [ -> ]See https://github.com/thomasokken/plus42des...ID_AND_IOS

I think that if you want to publish a clone on Play the already published source code is sufficient. However, I doubt it is well known outside this forum, especially that a pay version is coming so potential copycats might have missed their opportunity to grab the source.

But it is a risk, I know there are even companies that grab open source products, infest them with ads and call other developers to give them their own look and feel, change the package name and publish. Signal source code is also "offered" this way.

The first calculator app I used on Android sold out to a company that infested it with spyware (a calculator that needs access to my contacts?), I'm glad I stored the last decent apk.
(03-31-2022 06:09 PM)Thomas Okken Wrote: [ -> ]New update:

1. For Y^X with complex Y and integer X: use repeated squaring only if X between -256 and 256, as discussed above.
2. Fixed loading of skin GIFs with local colormaps. This was broken in the Windows, MacOS, and iOS versions. Note that among the skins in the collection on my web site, only mimax3 appears to have this format, but files like that can also be generated by recent versions of Microsoft Paint and Paint.NET. (Plus42 inherited this bug from Free42. It will be fixed in Free42 as well, in the next release.)
Just tried to download the latest Android beta, but couldn't find the apk in the download page....
Tried to read Plus42 documentation. Chrome browser disclaims all responsibility because security certificate of "https://thomasokken.com/plus42/#doc" is expired.
Hmm, I don't know why that happened. The automatic payment to renew the certificate looks to have been made four days ago. I've contacted the hosting provider, hopefully they'll fix it quickly.
Here too, in France.
It just got fixed. It looks OK again from here...
Ok here.
(04-06-2022 07:30 PM)Marco Polo Wrote: [ -> ]Just tried to download the latest Android beta, but couldn't find the apk in the download page....

I put it back in the download folder.
Thomas

You might look at offering the Android version on both Amazon App Store and Google Play, Amazon devices are blocked from using Google and Google devices are blocked from Amazon.
Noted. I'll look into it. Thanks!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Reference URL's