Post Reply 
New Bug in Matrix with SCALE [Solved]
01-04-2016, 05:30 PM (This post was last modified: 09-06-2016 11:29 AM by jrozsas.)
Post: #1
New Bug in Matrix with SCALE [Solved]
I was impressed with the result. This bug occurs both in the calculator as in the emulator.
After creating an matrix, using SCALE, the error occurs.
[Image: o73L5.jpg] [Image: sY49N.jpg]
Up to this point everything is correct.
After using the SCALE function:
[Image: CT66f.jpg] [Image: 0LoeN.jpg]
But when checking the matrix, sometimes the matrix is reset, sometimes the calculator restarts, sometimes the calculator enters wrong values in the matrix and sometimes its OK!
The error is random. Note that after the SCALE matrix is reset. I used the FORMAT function (F-C-O) and did not correct the error. To reproduce this error I realized the operation 5 times.
See the video.



Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
01-05-2016, 04:12 AM
Post: #2
RE: New Bug in Matrix with SCALE
Hello,

Sorry about the issue.
If you need to use SCALE, doing M1:= SCALE(EVAL(M1), ....) might work better.
SCALE is part of a small but frustrating number of functions that do side effects (ie, modify their inputs, in this case M1). This makes it relatively complex to implement.
This is a leftover from the HP38G.

However, SCALE is also able to work without side effects, but for this to work, you need the input to NOT be a variable name. Hence the EVAL above.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
01-05-2016, 10:06 AM
Post: #3
RE: New Bug in Matrix with SCALE
(01-05-2016 04:12 AM)cyrille de brébisson Wrote:  Hello,

Sorry about the issue.
If you need to use SCALE, doing M1:= SCALE(EVAL(M1), ....) might work better.
SCALE is part of a small but frustrating number of functions that do side effects (ie, modify their inputs, in this case M1). This makes it relatively complex to implement.
This is a leftover from the HP38G.

However, SCALE is also able to work without side effects, but for this to work, you need the input to NOT be a variable name. Hence the EVAL above.

Cyrille

These functions SCALE and SCALEADD are similar to the HP 50 functions RCI and RCIJ, very even used in SIMPLEX. I use RCI and RCIJ in HP 50.
What is the difference of mRow function in the HP Prime?

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
01-05-2016, 10:17 AM
Post: #4
RE: New Bug in Matrix with SCALE
It is not a solution, but it is simpler and faster than writing M1:= SCALE(EVAL(M1), ....)
See:
[Image: FVyGW.jpg]
The result in: [Image: WutXs.jpg]
Matrix M1 after :
[Image: 4YPhb.jpg]

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
01-06-2016, 05:30 AM
Post: #5
RE: New Bug in Matrix with SCALE
hello,

M1:= SCALE(M1*1, ....) would also work, be faster to type, but be slower to execute.

cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
01-06-2016, 10:08 AM
Post: #6
RE: New Bug in Matrix with SCALE
(01-06-2016 05:30 AM)cyrille de brébisson Wrote:  hello,

M1:= SCALE(M1*1, ....) would also work, be faster to type, but be slower to execute.

cyrille

cyrille, what is the difference of mRow function and scale in the HP Prime? It's the same thing?

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2016, 06:02 AM
Post: #7
RE: New Bug in Matrix with SCALE
Hello,

mRow is a CAS function.
It will work a little bit like SCALE, with the exception that it does not try to do in-place modification (ie, no auto store of result in input matrix).

This means that you can use it, BUT it will be slower because:
- Using it will require a Home to CAS/CAS to home transition
- CAS is usually slower on matrices because it does much more memory allocations (HOME handles matrices as 1 memory block of numbers, CAS handle each number as 1 memory block).

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
01-07-2016, 12:37 PM
Post: #8
RE: New Bug in Matrix with SCALE
(01-07-2016 06:02 AM)cyrille de brébisson Wrote:  Hello,

mRow is a CAS function.
It will work a little bit like SCALE, with the exception that it does not try to do in-place modification (ie, no auto store of result in input matrix).

This means that you can use it, BUT it will be slower because:
- Using it will require a Home to CAS/CAS to home transition
- CAS is usually slower on matrices because it does much more memory allocations (HOME handles matrices as 1 memory block of numbers, CAS handle each number as 1 memory block).

Cyrille

Thanks!

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
09-01-2016, 09:15 PM
Post: #9
RE: New Bug in Matrix with SCALE
Fortunately the new update 10637 has resolved this issue with SCALE.
I took several tests and there were no problems
Smile

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)