Post Reply 
CAS: log of large integers?
05-24-2015, 07:00 PM
Post: #20
RE: CAS: log of large integers?
(05-24-2015 05:27 PM)kharpster Wrote:  Joe/Gerald,

I walked through the code and can see what you are doing, good work! But what I am having trouble with is how you knew to use DOM_INT, there is only one reference to a DOM_ value in the user guide and that is for DOM_STRING. Is there another document that identifies the DOM_ types? The internal help text for type() only shows it being compared to a numeric value and not to a system "constant" that represents that value...

No, I don't know of any complete list of object types. Just throw any object at the type command (be sure to spell it in lowercase!) to see the name of an object type, e.g. type(123) in CAS returns DOM_INT, whereas type(123.) returns DOM_FLOAT. Adding zero to any object type turns it into an integer, useful for comparisons. Some type names have aliases, e.g. you can use "integer" in programs instead of DOM_INT, and "integer" is displayed as DOM_INT in the history stack. All of the ones I know about are here (discovered by experimentation and peeking directly into the firmware):

DOM_int = 0
float --> DOM_FLOAT = 1
integer --> DOM_INT = 2
DOM_LONGFLOAT = 3
complex --> DOM_COMPLEX = 4
DOM_IDENT = 6
DOM_MATRIX --> DOM_LIST = 7
algebraic --> DOM_SYMBOLIC = 8
symbol = 8 (does not change to DOM_SYMBOLIC)
rational --> DOM_RAT = 10
DOM_STRING = 12
DOM_FUNC = 13

Anybody know what object types 5, 9, and 11 are? (N.B. I'm referring to the type command, not the TYPE command here.)

Arcane trivia: The firmware also refers to object types "double" and "DOM_SPECIALFLOAT" but I get the feeling that these are either not implemented or not supported.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CAS: log of large integers? - Joe Horn - 05-21-2015, 06:37 AM
RE: CAS: log of large integers? - parisse - 05-21-2015, 11:28 AM
RE: CAS: log of large integers? - Gerald H - 05-22-2015, 04:57 PM
RE: CAS: log of large integers? - Gerald H - 05-22-2015, 05:57 PM
RE: CAS: log of large integers? - parisse - 05-22-2015, 07:01 PM
RE: CAS: log of large integers? - Gerald H - 05-23-2015, 01:47 PM
RE: CAS: log of large integers? - DrD - 05-23-2015, 06:23 PM
RE: CAS: log of large integers? - Joe Horn - 05-24-2015, 02:01 AM
RE: CAS: log of large integers? - DrD - 05-24-2015, 10:05 AM
RE: CAS: log of large integers? - Joe Horn - 05-24-2015, 03:07 PM
RE: CAS: log of large integers? - Joe Horn - 05-24-2015 07:00 PM
RE: CAS: log of large integers? - parisse - 05-25-2015, 05:38 AM
RE: CAS: log of large integers? - Joe Horn - 05-25-2015, 07:20 AM



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