HP Forums

Full Version: hidden/ undocumented weird value() function.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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'))
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
Reference URL's