Using Bob Delaney's fpPlugin on an M1 mac

If he’s adding 2π then he must be handling the complex number in polar format, where adding 2π to the angle will change it from a negative to positive value without changing the actual value of the complex number.

Someone was, then someone commented that part out as you can see. So it’s not anymore…

The problem in the end was that the temp variable was used twice. (Which normally should be fine) But, the internal datatype class he has for the BigComplex does not survive re-using of any kind.

(This has been fixed now by using 2 temp variables instead of re-using it which fixed fpPow and fpGamma). (The update can be found in my release thread)

2 Likes

You know, when I saw this I thought “I hope Robert is copying the source to a temp value inside of mul()” because if it does multiple operations in source AND the destination WHEN source IS the destination It will mess the source DURING such operations.

Such kind of thing may be occurring in more parts of the routines.

Yes I have put it on my list of things to check for when continuing refactoring the plugin.

The plugin still also has hundreds of leaks and memory clobbering that need to be tackled. (Its slow process to fix). Luckily most of it is around Exceptions or when feeding Nil inputs into something. So should not be huge issue if peoples code is good.

But in the todays version, Robert validated all the special operations for the BigComplex, as in did actual tests against known correct results. So thats something :slight_smile:

1 Like

Since most of this topic has been focused on prof. Delaney’s fp code, I thought I would report in on the complex matrix plugin. First off, a huge thanks to Bjorn for also bringing this one back to life. I have now gotten it integrated into my own neural network stuff and things are looking good. The edits to bring the old syntax up to a new one are straight-forward. The only one that is not obvious is that prof. Delaney’s “creatematrix” syntax used a string with row elements separated by commas and whole rows set off by semi-colons. The “new matrix” syntax expects spaces and endoflines respectively.

I have only texted on Mac OS so far.

Hmmmm I do not think I changed in any place what the input is to things, I would not have even known what was expected to make such decision.

He was of two minds on this one. The test app just reads off the text area, producing spaces and line ends. The internal creatematrix syntax is the one that wants commas and semicolons. Probably best to keep it just spaces and line ends all around.