Post Reply 
newRPL - build 1255 released! [updated to 1299]
08-02-2018, 02:30 AM (This post was last modified: 08-02-2018 08:50 PM by The Shadow.)
Post: #248
RE: newRPL - build 1089 released! [update:build 1089]
Claudio L. Wrote:I'm liking this idea. While it will break compatibility, I think it goes a long way to make the result more usable.
Actually, once you break compatibility we can completely break it and output:
* A unity factor (or sign actually), which would allow the quantity being factored to even have a physical unit attached to it.
* A list of factors
* A list of multiplicity

I vastly prefer this solution, but didn't realize it was on the table. By all means, do this!

EDIT: The reason why I strongly prefer it is that to actually USE the factorization for anything, you have to separate the multiplicities from the primes anyway. It's an extra loop (or extra caution on a single loop) in every single program that uses prime factors, and it shouldn't be necessary.

I hadn't thought of your idea of being able to give the unit well, units. Smile That's very cool.

Quote:I think it would be cleaner to do the above.
Then 1 would be:
{ }
{ }
(the only catch is that ΠLIST errors on empty lists, so this case needs to be trapped separately)

or we could actually do:
{ 1 }
{ 1 }

to make it more manageable by programs

I can live with the latter, as long as 1 never shows up as a factor in anything but 1, -1, or 0.

(I actually wouldn't have a problem error-trapping on empty lists, but I see your point.)

Quote:zero would factor as:
{ 0 }
{ 1 }

Bad idea. You're basically defining zero as positive. Better to do:

{ 1 }
{ 1 }

Yes, technically zero is not a unit... but it just makes more sense this way.

Quote:So, we would leave the leading factor, then a list of factors (or perhaps we should change the signs and output the roots?) and then a list of multiplicities.
For example for 4*x^2-8*x+4 the output would be:
{ -1}

(we could also use +1 in the middle list and define the factors as (x-an) rather than (x+an) )

Looks good. (x-an) is more traditional in the math community, because x-an=0 yields an rather than -an.

If you decide to let FACTORS handle rational numbers (please do!) don't forget to let it also handle rational functions. Just allow for negative exponents on polynomial factors.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
RE: newRPL - build 1089 released! [update:build 1089] - The Shadow - 08-02-2018 02:30 AM
newRPL - brickviking - 10-05-2018, 06:01 AM
How to participate? - erazor - 12-13-2019, 07:12 AM

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