Talk:Long multiplication: Difference between revisions

m (corrected section header indentifers.)
 
(5 intermediate revisions by 2 users not shown)
Line 40:
* Bracmat, calls operator *
* C++, calls operator * of cln::cl_I
* <del>C#, calls Multiply of System.Numerics.BigInteger</del>
* D (1st example), calls operator * of BigInt from std.bigint
* F#, calls operator *
Line 57:
* Seed7, calls operator *
* Slate, calls operator *
* <del>Smalltalk, calls operator *</del> (changed: now shows both)
 
For these examples, I would like some assurance that the outside algorithm really is long multiplication, and not some other algorithm (such as Karatsuba or Toom multiplication). Examples that use the wrong algorithm are incorrect. Further, I would like to clarify the task, to prohibit the use of outside algorithms, unless those algorithms do long multiplication. I think that [[Arbitrary-precision integers (included)]] is a better place to call outside algorithms. --[[User:Kernigh|Kernigh]] 00:36, 20 March 2012 (UTC)
Line 85:
::: I do not really see a point in asking for the code in languages where arbitrary precision is already builtin. For one, it should not lead newcomers of a language to do it that way. And second, as the builtin operators are usually highly tuned to the task, which a naive piece of code usually is not. Also, I found other languages, where it seemed perfectly ok to write a comment like "is native in language" (sidef) or even a call to BigInt arithmetic (D), so I think that should be also ok for languages like scheme, self, smalltalk etc. And b.t.w. what about languages which support an int256 type (eg native limited. but higher precision integer type). Are those allowed to use it or not? As I understood rosetta, it should give programmers a feel of how the language is used, not how its builtin operators are implemented. --[[User:Cg|Cg]] ([[User talk:Cg|talk]])
:::: Are you saying that newcomers to a language should not use the builtins? (Also, please sign your comments - you inserted your comment in front of my signature which might have been misleading.) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:19, 26 October 2015 (UTC)
::::: No, "to do it that way" referred "to reinventing and write your own (possibly suboptimal) multiply". And sorry for the edit mistake, and for the late reply (long time - no time).--[[User:Cg|Cg]] ([[User talk:Cg|talk]])
 
== PLI Fails for me ==
Line 104 ⟶ 105:
==integers or numbers?==
It doesn't specifically mention that only integers are to be used &nbsp; (although it did mention that &nbsp; ''one possible approach to arbitrary-precision integer algebra''). &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:25, 25 July 2015 (UTC)
 
==verify against builtin==
I've added an optional verify against builtin clause to the task description, as most implementations seem to adhere to the spirit of the task and explicitly implement longhand multiplication. However, seven entries do not, being Crystal, Icon, OI, Prolog, Slate, XPL0, and zkl. I am inclined to mark (and in the case of Slate, re-mark) those as incorrect. I would also suggest this task be renamed from "long" to "longhand". --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 13:35, 8 December 2020 (UTC)
Anonymous user