<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use of real types can result in precision problems in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38832#M35838</link>
    <description>&lt;BLOCKQUOTE&gt;Olivier wrote:&lt;BR /&gt;
Jaime, the question was discussed in this thread&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... 77&amp;amp;start=0"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
additional info here &lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/tech ... ml#title31"&gt;http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;/BLOCKQUOTE&gt;

OOPpss! I did not noticed that discussion!&lt;BR /&gt;
Sorry for the incovenience and thank you for your kind reply!</description>
    <pubDate>Sun, 28 Aug 2005 20:05:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-08-28T20:05:30Z</dc:date>
    <item>
      <title>Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38829#M35835</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have tried to do some GDL editing and have encountered a script problem under the folowing message:&lt;BR /&gt;
"Use of real types can result in precision problems at line ..."&lt;BR /&gt;
&lt;BR /&gt;
What does this mean?&lt;BR /&gt;
I assume "real types" are normal numbers like 0, 1,2, 3, etc.&lt;BR /&gt;
Can someone explain the origin of this kind of warning message?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 28 Aug 2005 12:51:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38829#M35835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-28T12:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38830#M35836</link>
      <description>It means that you are using a statement something like:
&lt;PRE&gt;IF realNumber = 6 THEN&lt;/PRE&gt;

Where this could cause problems if is reaNumber is not actually 6, but is 6.0000001 or 5.9999999. Since it's a real number, that's a perfectly real possibility. Is that were the case, realNumber &amp;lt;&amp;gt; 6, even though it is so close no one could tell the difference.&lt;BR /&gt;
&lt;BR /&gt;
There was a "preferred method" on this somewhere, in checking if a real number was within a certain range of the preferred value, but I cannot seem to find it.</description>
      <pubDate>Sun, 28 Aug 2005 14:30:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38830#M35836</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-08-28T14:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38831#M35837</link>
      <description>&lt;BLOCKQUOTE&gt;Jaime wrote:&lt;BR /&gt;I have tried to do some GDL editing and have encountered a script problem under the folowing message:&lt;BR /&gt;
"Use of real types can result in precision problems at line ..."&lt;/BLOCKQUOTE&gt;

Jaime, the question was discussed in this thread&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... 77&amp;amp;start=0"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
additional info here &lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/tech ... ml#title31"&gt;http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31&lt;/LINK_TEXT&gt;&lt;/A&gt;</description>
      <pubDate>Sun, 28 Aug 2005 15:51:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38831#M35837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-28T15:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38832#M35838</link>
      <description>&lt;BLOCKQUOTE&gt;Olivier wrote:&lt;BR /&gt;
Jaime, the question was discussed in this thread&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... 77&amp;amp;start=0"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=4677&amp;amp;start=0&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
additional info here &lt;BR /&gt;
&lt;A href="http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31" target="_blank"&gt;&lt;LINK_TEXT text="http://download.graphisoft.com/ftp/tech ... ml#title31"&gt;http://download.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/LibDevGuide/TechnicalStandards.html#title31&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;/BLOCKQUOTE&gt;

OOPpss! I did not noticed that discussion!&lt;BR /&gt;
Sorry for the incovenience and thank you for your kind reply!</description>
      <pubDate>Sun, 28 Aug 2005 20:05:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38832#M35838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-28T20:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38833#M35839</link>
      <description>I was reading "GDL Technical Standards 2"&lt;BR /&gt;
about this precision issue and read these statements.&lt;BR /&gt;
&lt;BR /&gt;
"Until ArchiCAD 9, there was only one numeric type, floating point number. You had the possibility to distinguish between some dimension types, but all of them were represented as 'real' numbers.&lt;BR /&gt;
&lt;BR /&gt;
From ArchiCAD 9 on, the integer inner type was introduced. In connection with the parameter types, the current state is the following: "&lt;BR /&gt;
&lt;BR /&gt;
What is "integer inner type" ?&lt;BR /&gt;
I don't see any new parameter types.&lt;BR /&gt;
In fact, the more times I read these two sentences&lt;BR /&gt;
the less I understand them.&lt;BR /&gt;
The first statement I don't understand because there are&lt;BR /&gt;
two numeric types, integer and floating point.&lt;BR /&gt;
&lt;BR /&gt;
Comments anyone ?&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Mon, 29 Aug 2005 01:00:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38833#M35839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-29T01:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38834#M35840</link>
      <description>When I read the AC9 documentation I thought, that we are getting real different numeric types. But it seems for me variables are only real integer, if one does not use them in floating point operations. Is that right?&lt;BR /&gt;
I ever deplored, that all numeric types behave as their declaration only in the parameter list and not inside the script.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;In fact, the more times I read these two sentences the less I understand them.&lt;/BLOCKQUOTE&gt;
So do I. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;
&lt;BLOCKQUOTE&gt;The first statement I don't understand because there are two numeric types, integer and floating point.&lt;/BLOCKQUOTE&gt;
No. I don't think it means there are two numeric types. It means: There are two types: string and numeric. And numeric is always floting point.&lt;BR /&gt;
&lt;BR /&gt;
And as I understand the technical standards a numeric type is from AC9 on as long an integer type, as you don't use it in a way it receives a floating point result. I don't see, that this makes things better.</description>
      <pubDate>Mon, 29 Aug 2005 06:27:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38834#M35840</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-29T06:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38835#M35841</link>
      <description>Hello Frank,&lt;BR /&gt;
You say in your post:&lt;BR /&gt;
"No. I don't think it means there are two numeric types. It means: There are two types: string and numeric. And numeric is always floting point."&lt;BR /&gt;
&lt;BR /&gt;
Is it not true that length, angle, and real number  are floating point type&lt;BR /&gt;
while integer, boolean, material, line type and fill pattern are integer type and text, of course, is a character type or, as you say, string type.&lt;BR /&gt;
&lt;BR /&gt;
Though Integer is numeric, it is clearly not a floating point because&lt;BR /&gt;
you are not allowed to type decimal values in the integer field.&lt;BR /&gt;
Therefor there are two numeric types integer and floating point.&lt;BR /&gt;
Is this not so ?&lt;BR /&gt;
&lt;BR /&gt;
You say:&lt;BR /&gt;
"I ever deplored, that all numeric types behave as their declaration only in the parameter list and not inside the script."&lt;BR /&gt;
Are you saying that you wish GDL should require in a variable declaration&lt;BR /&gt;
what the data type is for that variable ?&lt;BR /&gt;
I always wondered how GDL could function without this.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Mon, 29 Aug 2005 19:17:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38835#M35841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-29T19:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38836#M35842</link>
      <description>You have to differ between parameters (out of the parameter list) and variables. When a script is started for each parameters will be set a variable. And this can be string (one type) or real (floating point, one type). Try Debugger in edit menu and list all available variables. You will see. That's all ... 'till nine. Since nine it should give real integers. But I have not found any kind of statement to declare them. As I understand the technical standards, variables are as long from type integer, as long you just do integer operations with them (add, subtract, booleans etc.). In the moment you do an operation, which gives a floting point result (e.g. 2+5*PI/1.75) they change back to floating point.&lt;BR /&gt;
&lt;BR /&gt;
All other parameters, for which it makes no sense, that they are floats, can have a fraction part too .&lt;BR /&gt;
&lt;BR /&gt;
Define a new pen in the parameter list. Named "CheckPen" try this in 2D-Script:
&lt;PRE&gt;pen CheckPen
rect2 0,0,0.5,0.5
CheckPen=Checkpen+1.7
pen CheckPen
text2 0,0,CheckPen&lt;/PRE&gt;

In some cases it's very helpful, but if comparations as &lt;B&gt;IF A=12 THEN ...&lt;/B&gt; need so horrible constructions as described in tech standards I would prefer to have a basic set of types as string, real, integer, double integer and binary.</description>
      <pubDate>Tue, 30 Aug 2005 00:24:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38836#M35842</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-30T00:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38837#M35843</link>
      <description>&lt;BLOCKQUOTE&gt;Though Integer is numeric, it is clearly not a floating point because&lt;BR /&gt;
you are not allowed to type decimal values in the integer field.&lt;BR /&gt;
Therefor there are two numeric types integer and floating point.&lt;BR /&gt;
Is this not so ?&lt;/BLOCKQUOTE&gt;

No, it isn't. As I described before: The parameter list limitations are nothing else than an input mask.&lt;BR /&gt;
&lt;BR /&gt;
The Plan-Dump shows, that they are stored without fraction part, but the become floating point, when script is running.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="blue"&gt;SYMBOL 3 {&lt;BR /&gt;
	"Test.7" 86 1 " " 0 "0. Geschoß " 0&lt;BR /&gt;
	"demo_object"&lt;BR /&gt;
	9.7686 0.0347 0.0000 0.00°&lt;BR /&gt;
	1.000000     1.000000&lt;BR /&gt;
	0 0&lt;BR /&gt;
	29&lt;BR /&gt;
	8&lt;BR /&gt;
	"A" 1.0000&lt;BR /&gt;
	"B" 0.2000&lt;BR /&gt;
	"Typ" "Flach"&lt;BR /&gt;
	"D" 2.5000&lt;BR /&gt;
	"penH" 64&lt;BR /&gt;
	"penB" 5&lt;BR /&gt;
	"zzyzx" 0.0000&lt;BR /&gt;
	0.000000     0.000000&lt;BR /&gt;
&lt;BR /&gt;
	PROPERTIES 3 {&lt;BR /&gt;
	}&lt;BR /&gt;
}&lt;/FONT&gt;</description>
      <pubDate>Tue, 30 Aug 2005 00:33:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38837#M35843</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-30T00:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38838#M35844</link>
      <description>Hello Frank,&lt;BR /&gt;
I did what you suggested and you are absolutely right !&lt;BR /&gt;
When the script is run the the integer variables are floating point.&lt;BR /&gt;
I wonder why the ruse or as you say "input mask".&lt;BR /&gt;
&lt;BR /&gt;
You say:&lt;BR /&gt;
"As I understand the technical standards, variables are as long from type integer, as long you just do integer operations with them (add, subtract, booleans etc.). In the moment you do an operation, which gives a floting point result (e.g. 2+5*PI/1.75) they change back to floating point."&lt;BR /&gt;
&lt;BR /&gt;
Another quote from "GDL Technical Standards 2" might explain this.&lt;BR /&gt;
"GDL variables still don't require type definition, the type is determined &lt;BR /&gt;
during the interpretation from the value to be loaded into the variable."&lt;BR /&gt;
Which is exactly what you observed and stated above.&lt;BR /&gt;
&lt;BR /&gt;
You said:&lt;BR /&gt;
"but if comparations as IF A=12 THEN ... need so horrible constructions as described in tech standards I would prefer to have a basic set of types as string, real, integer, double integer and binary."&lt;BR /&gt;
&lt;BR /&gt;
I completely agree, especially now after what you demonstrated to me.&lt;BR /&gt;
It seems like GS is trying to preserve this no type declaration required "feature" by suggesting these "horrible constructions".&lt;BR /&gt;
&lt;BR /&gt;
Thank you for showing me the  "input mask"&lt;BR /&gt;
Peter Devlin&lt;BR /&gt;
P.S.&lt;BR /&gt;
I still wonder what is "integer inner type"</description>
      <pubDate>Tue, 30 Aug 2005 02:48:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38838#M35844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-30T02:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38839#M35845</link>
      <description>&lt;BLOCKQUOTE&gt;I still wonder what is "integer inner type"&lt;/BLOCKQUOTE&gt; I think they mean: no declaration requiered, declared inside (=inner) the compiler/interpreter as integer by usage.&lt;BR /&gt;
&lt;BR /&gt;
But thats awful, because you have no control to proof, if your script does anwhere something to discard the integer state of a variable.</description>
      <pubDate>Tue, 30 Aug 2005 06:11:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38839#M35845</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-30T06:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38840#M35846</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;
Comments anyone ?&lt;BR /&gt;
Peter Devlin&lt;/BLOCKQUOTE&gt;

Just IMHO.&lt;BR /&gt;
&lt;BR /&gt;
There are two stuffs: a variable(parameter) and value.&lt;BR /&gt;
A variable has a name and value. A variable has type and value has&lt;BR /&gt;
type, but it is not identical. A type of value is an internal type,&lt;BR /&gt;
type of representation. A variable from point of view GDL on former&lt;BR /&gt;
can have type of number ( both integer and floating ) and string as we&lt;BR /&gt;
can not find out it by GDL ( see VARTYPE ).&lt;BR /&gt;
So, 9 has introduced internal distinction of types of values for&lt;BR /&gt;
numbers on integer and floating, like number subtype.&lt;BR /&gt;
( May be for more effective calculations, I do not know. )&lt;BR /&gt;
I think, that the internal GDL engine uses this type information in&lt;BR /&gt;
expressions. I guess it keeps the integer type while possible and will&lt;BR /&gt;
internally convert type to floating in mixed type expressions.&lt;BR /&gt;
So I think, that we can use comparisons safely:&lt;BR /&gt;
IF ivar = 12&lt;BR /&gt;
If we are sure, that "ivar" has integer value.</description>
      <pubDate>Tue, 30 Aug 2005 08:03:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38840#M35846</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2005-08-30T08:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38841#M35847</link>
      <description>&lt;BLOCKQUOTE&gt;If we are sure, that "ivar" has integer value.&lt;/BLOCKQUOTE&gt;Yes. If we are shure. So we have to be aware that it does not become floating point.&lt;BR /&gt;
&lt;BR /&gt;
But mostly we will not program the change intended. We can not proof, if it has happened accidentally.&lt;BR /&gt;
&lt;BR /&gt;
I book this feature under "nice for the compiler, not realy helpful for me". &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;</description>
      <pubDate>Tue, 30 Aug 2005 08:17:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38841#M35847</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-30T08:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38842#M35848</link>
      <description>Even the debugger doesn't show, if its integer or floating point.&lt;BR /&gt;
&lt;BR /&gt;
BTW. The debugger just displays as many decimals as adjusted in the general settings for dialogs. It would be more helpful to give us the full or individual selectable precision. As one can see in the plan dump posted before AC/GDL works internal with more decimal places than we can see in the dialogs.</description>
      <pubDate>Tue, 30 Aug 2005 08:26:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38842#M35848</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-30T08:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38843#M35849</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;[Yes. If we are shure. So we have to be aware that it does not become floating point.&lt;BR /&gt;
&lt;BR /&gt;
But mostly we will not program the change intended. We can not proof, if it has happened accidentally.
&lt;/BLOCKQUOTE&gt;

As far as I remember, AC9 shows a warning of it at script checking.&lt;BR /&gt;
I do not see a good way to avoid mistakes like this.&lt;BR /&gt;
For example in strong typed languages C/C++ ( a type of each variable is declared ), I can use the similar mixed type comparison too.&lt;BR /&gt;
It will be valid ( compiler may generate a warning, but it is not language error ). &lt;BR /&gt;
&lt;BR /&gt;
Unfortunately there are a lot of things in GDL where possible to be mistaken.&lt;BR /&gt;
For example, all variables are global - it is awful.  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 30 Aug 2005 08:55:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38843#M35849</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2005-08-30T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38844#M35850</link>
      <description>Hello everybody,&lt;BR /&gt;
&lt;BR /&gt;
We will soon be updating the Technical Standards document.   I must agree the original text was not too clear.   Hopefully the below makes a bit more sense.&lt;BR /&gt;
 &lt;BR /&gt;
++++++++++++++++++&lt;BR /&gt;
Before ArchiCAD 9 all numeric values were stored internally as floating point values.   This meant that integer values were imprecisely stored.   From ArchiCAD 9 integers and hence GDL parameter types that are best described with integers are correctly stored internally as integers.&lt;BR /&gt;
&lt;BR /&gt;
GDL types internally stored as an Integer&lt;BR /&gt;
Integer&lt;BR /&gt;
Boolean&lt;BR /&gt;
Material&lt;BR /&gt;
Line type&lt;BR /&gt;
Fillpattern&lt;BR /&gt;
Pencolor&lt;BR /&gt;
Intensity (Light)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
GDL types internally stored as a Floating-point&lt;BR /&gt;
Length&lt;BR /&gt;
Angle&lt;BR /&gt;
Real&lt;BR /&gt;
RGB Color component (Light)&lt;BR /&gt;
&lt;BR /&gt;
GDL variables still don't require type definition, the type is determined during the interpretation from the value to be loaded into the variable. The output of numeric operators now have a type. You should consult the GDL Manual for this information..&lt;BR /&gt;
&lt;BR /&gt;
The programmer can safely compare integer types with the equality operator.   In fact, from ArchiCAD 9 warnings are now issued, if a programmer tries to directly compare floating point values with integer values using the equality operator.  For equality-comparisons of floating-point numbers use a small epsilon value meaning the precision of the comparison. For equality-comparisons of a floating-point number and an integer use the round_int function.&lt;BR /&gt;
&lt;BR /&gt;
Below some sample methods of testing for equivalence between different numeric types are described:&lt;BR /&gt;
+++++++++++++++++&lt;BR /&gt;
&lt;BR /&gt;
Hope this is helpful&lt;BR /&gt;
Ed</description>
      <pubDate>Tue, 30 Aug 2005 13:28:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38844#M35850</guid>
      <dc:creator>Ed_Brown</dc:creator>
      <dc:date>2005-08-30T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use of real types can result in precision problems</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38845#M35851</link>
      <description>Thank you Ed.&lt;BR /&gt;
That is very helpfull.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Tue, 30 Aug 2005 20:54:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Use-of-real-types-can-result-in-precision-problems/m-p/38845#M35851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-30T20:54:17Z</dc:date>
    </item>
  </channel>
</rss>

