Talk:Modular arithmetic: Difference between revisions

Content added Content deleted
m (moved Talk:Modular Arithmetic to Talk:Modular arithmetic: capitalization policy)
m (Mark who did the contribution)
Line 3: Line 3:
The purpose of this task is to show, if your programming language allows it,
The purpose of this task is to show, if your programming language allows it,
how to redefine operators so that they can be used transparently on modular
how to redefine operators so that they can be used transparently on modular
integers. You can do it either by using a dedicated library, or by implementing your own class.
integers. You can do it either by using a dedicated library, or by implementing your own class.
</pre>
</pre>
This is a nice interesting task description - although it would be much more interesting
This is a nice interesting task description - although it would be much more interesting
Line 19: Line 19:
This will make functional solutions to this task look longer than object oriented languages.
This will make functional solutions to this task look longer than object oriented languages.


I therefore suggest that *all* solutions should show how to redefine operators/numbers without
I therefore suggest that ''all'' solutions should show how to redefine operators/numbers without
using existing libraries.
using existing libraries.
<div><small>''(This was written by [[User:Soegaard|Soegaard]] ([[User_talk:Soegaard|Talk]] | [[Special:Contributions/Soegaard|contribs]]) at 21:22, 11 March 2013‎)''</small></div>


:Even using a library is not without interest imho, as it shows the reader how the library is named and how it is used. For instance, it's not so easy to find out the name 'Mod::Int' when you never heard of it.
:Even using a library is not without interest imho, as it shows the reader how the library is named and how it is used. For instance, it's not so easy to find out the name 'Mod::Int' when you never heard of it.