Talk:Quaternion type: Difference between revisions

Formula for norm of quaternion made invisible by under-tested cosmetic edit at 20:52, 6 July 2016
(Formula for norm of quaternion made invisible by under-tested cosmetic edit at 20:52, 6 July 2016)
 
(22 intermediate revisions by 6 users not shown)
Line 71:
 
Comments please. --[[User:Paddy3118|Paddy3118]] 12:28, 8 May 2011 (UTC)
 
: I agree that failures in the general sense which are not failures to meet the task need to be treated differently from failures to satisfy the task. Perhaps we could get a "bug but acceptable by task requirements" template to mark them? --[[User:Rdm|Rdm]]
 
== ooRexx ==
 
'''Beautiful''', BUT
shouldn't
<lang rexx>
::method "><"
-- this is equivalent of "\=="
forward message("\==")
</lang>
be equivalent of "\="
 
and why not distinguish = and == ??
::method "=" -- this is equivalent of "==" forward message("==")
 
--[[User:Walterpachl|Walterpachl]] 07:18, 15 July 2012 (UTC)
 
==Why is it so complicated?==
 
This task is a nice example of why sometimes I deplore that programming languages are not as elegant as mathematics. Normally what is simple in maths should be simple in programming, but it's obviously not. I mean, quaternions are supposed to be defined as algebraic expressions of four entities 1, i, j, k such as 1 is the multiplicative neutral element and
 
<math>i i = j j = k k = i j k = -1</math>
 
I wish it was possible to just specify those identities as particular cases of a general Algebraic class or something, and be done with it. I kind of hoped that Perl 6 would allow it, but when I look at the proposed code (which did not even worked last time I checked), I can't help finding it long and ugly.
 
--[[User:Grondilu|Grondilu]] ([[User talk:Grondilu|talk]]) 10:27, 2 May 2013 (UTC)
 
: One issue, here, is that humans are many orders of magnitude smarter than computers. So the information needed to convey a new system to a human is qualitatively different from the engineering needed to convey that system to a computer.
: Another issue is that traditionally programming languages have been thought of as abstractions representing sequences of computer instructions ([some examples of] type theory[s], for example), or abstractions representing "core mechanisms" (scoping rules, for example). There has been some work based on modeling hardware behavior using mathematical concepts (array theory, for example), but that's not where most communities focus their energy.
: There are lots of infinities here and unless we are careful the computing platform will get bogged down, spending a bulk of the computational time on unnecessary issues. As an example, consider whether we should have a hermetian basis for quaternions or whether octonions are acceptable as an implementation of quaternions. Since we are people, and since we are smart, we have a concept of simplicity which kicks in when we understand something, but computers do not have that. [But this also means that if it seems complicated we do not understand it.] --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 17:16, 2 May 2013 (UTC)
 
Grondilu, you may consider [http://www.gap-system.org/ GAP]. You can define an algebra by specifying it's multiplication table: I added an example in the GAP section. [[User:Arbautjc|Arbautjc]] ([[User talk:Arbautjc|talk]]) 20:24, 28 October 2013 (UTC)
 
==Imaginary parts (plural)==
I had to mark both jq and Julia as incorrect as they both had the imaginary parts of a quaternion defined as just i by their definition of <code>imag</code>. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:30, 10 August 2014 (UTC)
 
:I am confused - why should the internal details of the implementation constitute a problem if the results are correct? I spot checked the julia results and the examples I looked at looked fine. I have not studied the julia code, but it sounds like it might be using a [[wp:Cayley–Dickson_construction|Cayley-Dickson]] representation of quaternions - which would be completely correct. But I also have not studied those languages in depth, and I might have overlooked something important. Can you please go into more detail about what specifically is wrong here? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 17:47, 10 August 2014 (UTC)
 
::Hi, Looking through the function names are came across image. It just seemed wrong to access only one of the three imaginary parts of a quaternion via that name - especially when the other imaginary parts seem to be adjacent indices away.
::Why the use of the name? What would imag be used for? It seems odd to single out I over j over k in such a way. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 18:49, 10 August 2014 (UTC)
 
: Paddy3118 - I don't doubt your good intentions, but there is nothing "wrong" or even misleading about the Julia entry. (I am not part of the Julia team, but I do have extensive training in mathematics.)
 
: First, the Julia entry plainly states that the code is part of the Julia library. It is helpful to see the code as a whole -- that's what this website is all about! Second, as rdm pointed out, since the library (taken as a whole) can be used to solve the assigned problems completely and accurately, it seems unnecessary and unwise to flag irrelevant details about naming as needing attention, letting alone claiming they are "incorrect". Third, the bit that offends you makes no claim that "imag(.)" returns all the imaginary parts -- indeed that would probably not even be desirable.
 
: You might say that since the Julia library provides real(_), it ought to provide accessor functions for each of the imaginary components, but that should perhaps be the subject of discussion between you and the good people at Julia. I've checked the most recent Julia library, and the same accessor functions ("real" and "imag") are still defined there. The choice of the name "imag" for the "i" component has four letters, just like "real", and is really unobjectionable. [[User:Peak|Peak]] ([[User talk:Peak|talk]]) 19:28, 10 August 2014 (UTC)
 
Hi Peak, imag looks like it was probably forgotten from extending imaginary numbers to their implementation for quaternions. It jq is based on the Julia entry, could you state its use? Maybe there is no use for this in Julia either? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 19:52, 10 August 2014 (UTC)
 
It seemed straight -forward to involve the [https://github.com/JuliaLang/julia/issues/7945 Julia library writers]. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 20:08, 10 August 2014 (UTC)
: Moved to [https://github.com/andrioni/Quaternions.jl/issues/4 here]. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 20:26, 10 August 2014 (UTC)
: Julia code on site (well one source), is fixed.
 
===Julia outdated w.r.t. imag?===
Look at [https://github.com/andrioni/Quaternions.jl this link] to see a version from the Julia site that has fixed imag to be:
:<code>imag{T}(z::Quaternion{T}) = Quaternion(zero(T), z.q1, z.q2, z.q3)</code>
If jq was a copy ...
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:16, 11 August 2014 (UTC)
 
==Formula hidden to most browsers by under-tested cosmetic edits at 20:52, 6 July 2016 ==
 
Under-tested cosmetic edits made to the task page at 20:52, 6 July 2016, including the injection of spaces around expressions in &lt;math&gt; tags, have left the formula for the '''norm of a quaternion''' completely invisible to all browsers which display the graphic file version of formulae rather than processing the MathML (this is, in fact, the majority of browsers). The MediaWiki processor does not currently expect such spaces, and generates syntactically ill-formed HTML if they are introduced. Other aspects of this cosmetic edits may further compound the problem. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 21:41, 22 September 2016 (UTC)
9,655

edits