https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112011-07-27T16:25:17ZRuby Issue Tracking SystemRuby master - Feature #4831: Integer#prime_factorshttps://bugs.ruby-lang.org/issues/4831?journal_id=197662011-07-27T16:25:17Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Yes, #prime_factors and #factors are synonyms.</p> Ruby master - Feature #4831: Integer#prime_factorshttps://bugs.ruby-lang.org/issues/4831?journal_id=248872012-03-18T18:46:39Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Feature #4831: Integer#prime_factorshttps://bugs.ruby-lang.org/issues/4831?journal_id=315402012-10-25T20:00:45Zyhara (Yutaka HARA)
<ul><li><strong>Target version</strong> changed from <i>2.0.0</i> to <i>2.6</i></li></ul> Ruby master - Feature #4831: Integer#prime_factorshttps://bugs.ruby-lang.org/issues/4831?journal_id=686902017-12-25T18:15:00Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Target version</strong> deleted (<del><i>2.6</i></del>)</li></ul> Ruby master - Feature #4831: Integer#prime_factorshttps://bugs.ruby-lang.org/issues/4831?journal_id=696842018-01-23T08:09:51Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul></ul><p>I am not against adding such an alias but I'd like to think with more inputs. At this moment, I don't have strong reason to justify the name.</p>
<p>From a certain perspective, the alias is simply wrong because the method returns not only prime factors of the receiver but also their multiplicities -- i.e. the prime division of the receiver.<br>
For me, <code>200.prime_factors</code> sometimes looks to return (or yield) <code>[2, 2, 2, 5, 5]</code> as MATLAB does.</p>
<p>Mame, do you have any concrete examples which support your expectation to the return value? Or any suggestions from native English speakers or mathematicians?</p>