HP Forums
hidden/ undocumented weird value() function. - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: hidden/ undocumented weird value() function. (/thread-16597.html)



hidden/ undocumented weird value() function. - toshk - 04-04-2021 01:41 AM

cas:
apply((x)->((x==1)) OR ((x==2)),[[1,2,3],[1,2,3]],'matrix')

weird turns "true" to 1 and "false" to 0

value(apply((x)->((x==1)) OR ((x==2)),[[1,2,3],[1,2,3]],'matrix'))


RE: hidden/ undocumented weird value() function. - roadrunner - 04-04-2021 10:43 AM

What is the value function supposed to do? On my simulator this:

value(apply((x)->((x==1)) OR ((x==2)),[[1,2,3],[1,2,3]],'matrix'))

returns:

value([[1,1,0],[1,1,0]])

while this:

anythinghere(apply((x)->((x==1)) OR ((x==2)),[[1,2,3],[1,2,3]],'matrix'))

returns:

anythinghere([[1,1,0],[1,1,0]])

This is while using the default cas settings.

-road