Readability: Difference between revisions
Jump to navigation
Jump to search
m (→Examples) |
|||
Line 8: | Line 8: | ||
xVar←+/(x-(+/x)÷⍴x)*2 | xVar←+/(x-(+/x)÷⍴x)*2 | ||
r←(+/x×y)÷(xVar×yVar)×0.5</pre> | r←(+/x×y)÷(xVar×yVar)×0.5</pre> | ||
This also avoids reusing variable names, and thus ensures that the code can be rerun from | This also avoids reusing variable names, and thus ensures that the code can be rerun from any point. The chosen additional variable names are still short, but quite indicative of what they signify ([[wikipedia:variance|variance]]). Finally, the <source lang=apl inline>.5</source> is expanded to <source lang=apl inline>0.5</source> which helps to clarify that this is a decimal number and not an [[inner product]]. | ||
=== IBM === | === IBM === |