Post Reply 
Plus42 Equations, Preview Release
03-31-2022, 08:00 AM (This post was last modified: 03-31-2022 08:04 AM by toml_12953.)
Post: #481
RE: Plus42 Equations, Preview Release
(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)
>>>

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-31-2022, 08:35 AM
Post: #482
RE: Plus42 Equations, Preview Release
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2022, 10:09 AM
Post: #483
RE: Plus42 Equations, Preview Release
(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.
Find all posts by this user
Quote this message in a reply
03-31-2022, 10:25 AM
Post: #484
RE: Plus42 Equations, Preview Release
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.)
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2022, 11:01 AM (This post was last modified: 03-31-2022 11:02 AM by Thomas Okken.)
Post: #485
RE: Plus42 Equations, Preview Release
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...
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2022, 06:09 PM (This post was last modified: 04-01-2022 08:21 AM by Thomas Okken.)
Post: #486
RE: Plus42 Equations, Preview Release
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.)
Visit this user's website Find all posts by this user
Quote this message in a reply
04-05-2022, 01:36 PM
Post: #487
RE: Plus42 Equations, Preview Release
I saw the Plus42 repository is gone from Github, so is there going to be a Play store release soon?
Find all posts by this user
Quote this message in a reply
04-05-2022, 02:39 PM
Post: #488
RE: Plus42 Equations, Preview Release
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.
Find all posts by this user
Quote this message in a reply
04-05-2022, 05:11 PM (This post was last modified: 04-05-2022 05:19 PM by johanw.)
Post: #489
RE: Plus42 Equations, Preview Release
(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.
Find all posts by this user
Quote this message in a reply
04-05-2022, 06:05 PM
Post: #490
RE: Plus42 Equations, Preview Release
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-06-2022, 08:42 AM
Post: #491
RE: Plus42 Equations, Preview Release
(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.
Find all posts by this user
Quote this message in a reply
04-06-2022, 07:30 PM
Post: #492
RE: Plus42 Equations, Preview Release
(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....
Find all posts by this user
Quote this message in a reply
04-07-2022, 06:44 AM
Post: #493
RE: Plus42 Equations, Preview Release
Tried to read Plus42 documentation. Chrome browser disclaims all responsibility because security certificate of "https://thomasokken.com/plus42/#doc" is expired.
Find all posts by this user
Quote this message in a reply
04-07-2022, 07:04 AM
Post: #494
RE: Plus42 Equations, Preview Release
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2022, 08:08 AM
Post: #495
RE: Plus42 Equations, Preview Release
Here too, in France.

Gérard.
Find all posts by this user
Quote this message in a reply
04-07-2022, 10:41 AM
Post: #496
RE: Plus42 Equations, Preview Release
It just got fixed. It looks OK again from here...
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2022, 10:49 AM
Post: #497
RE: Plus42 Equations, Preview Release
Ok here.

Gérard.
Find all posts by this user
Quote this message in a reply
04-07-2022, 12:39 PM
Post: #498
RE: Plus42 Equations, Preview Release
(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.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2022, 01:14 PM
Post: #499
RE: Plus42 Equations, Preview Release
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.
Find all posts by this user
Quote this message in a reply
04-07-2022, 01:39 PM
Post: #500
RE: Plus42 Equations, Preview Release
Noted. I'll look into it. Thanks!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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