The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Strange behaviour STRING command in case STRING(√7)
11-20-2016, 04:58 PM
Post: #1
Strange behaviour STRING command in case STRING(√7)
With reference to another thread I wanted to investigate the behaviour of STRING(√7).

In Home view it returns “2.6457513....” as expected.
In CAS view it returns “√7”. This is also good.

But now the strange things.
When I store STRING(√7) into the variable s and examine its properties I get the following:

Quote:STRING(√7) : “√7”

s:=STRING(√7) : “√7”

SIZE(s) : 4
s(1) : “”
s(2) : “”
s(3) : “”
s(4) : “7”
ASC(s(1)) : “Error: Invalid input”
ASC(s(2)) : “Error: Invalid input”
ASC(s(3)) : “Error: Invalid input”
ASC(s(4)) : {55}

So the length of the string is not 2 as expected but 4 and the first 3 elements do not have a unicode representation.

When I do the same things in the HP 50g I get results I like better: a string length of 2 and the characters √ and 7 as its elements.

On the other hand, the Prime can get √7 back once “√7” is given, and as far as I know the HP 50g can not do that:

Quote:EXPR(s): √7
EXPR(“√7”): √7
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Strange behaviour STRING command in case STRING(√7) - Jan_D - 11-20-2016 04:58 PM



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