English
Opportunities and suggestions

wish: New relationaler Operator "ungefähr"

 

Frank
Abbing
i wish me (in first line for Floats) whom new relationalen Operator: about or. almost same. means quasi one Gleichheitszeichen with of/ one spare einstellbaren tolerance, z.B.:

~=

or

><

and moreover a function, around the Toleranzwert (in positiver and at the same time too negativer direction) To settle, How z.B.:

Set(About, 0.0001)

the whole would too meaningfully for Integer-numbers. in the drop setting one even ganzzahlige values:

Set(About,3)

For this, Please too reading: [web]https://www.rgh-soft.de/forum01/read.php?f=7&i=12824&t=12824[/web] and [web]https://de.wikipedia.org/wiki/Gleichheitszeichen[/web]
 
11/08/07  
 




Hubert
Binnewies
find so did i very meaningfully.....

I have so one Konstrukt already time uses.
then To times the ATARI ST there were in its Betriebssystem (then TOS called) a Systemvariable a such dreiwertige Logik encompassed.

tappt im dunkeln encompassed a 0 with : floppy disk not changed, a 1 with floppy disk changed and a 2 with floppy disk möglicherweise changed.

as i then with a friend the Tools ST wrote, the over Data Becker vertrieben watts, i was in some Make over these Dreiwertige Logik integrally happy.

Greeting Hubert
 
WinXP Prof, XProfan 9.1 Newbie

Ein kluger Kopf sagte mal:
"Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!"
11/10/07  
 




Frank
Abbing
*Hochschieb*
 
11/13/07  
 



I emfinde this Operator as balderdash.
 
11/13/07  
 



is about so How the berühmte Jaein of Dostojewski
 
11/13/07  
 




Jörg
Sellmeyer
Something like Perhaps?
CompileMarkSeparation
Proc RoundAbout

    Parameters F!,n%,G&
    Declare r%
    r% = Round(F!,n%) = G&
    Print Str$(F!) +  =  + Str$(G&) + :  + Str$(r%)
    Return r%

EndProc

RoundAbout(0.99993,1,5)
RoundAbout(1.09993,1,2)
RoundAbout(2.99993,3,3)
RoundAbout(0.99093,1,1)
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/13/07  
 




Frank
Abbing
@Jörg, no function to that rounds, separate a circumstance!
@ iF, straight of you had I expects, a sinnvolle Vereinfachung To discern.

naturally can itself the too so inquire (example):
CompileMarkSeparation
x!=1.573525
y!=1.573524

WhileLoop 100

    If ((y!>=x!-0.0000001) and (y!<=x!+0.0000001))

        Print x!, y!

    EndIf

    x!=x!+0.0000001
    y!=y!+0.00000015

CompileMarkSeparation
x!=1.573525
y!=1.573524
Set(About, 0.0000001)

WhileLoop 100

    If y!><x!

        Print x!, y!

    EndIf

    x!=x!+0.0000001
    y!=y!+0.00000015

EndWhile

 
11/13/07  
 



now as Vereinfachung erkenne I it sehrwohl, only the meaningfully reicht me here for a Implementierung not integrally from - simply because myself yet none drop having with the I it had need can. can but well his that I here only slightly übersehe - can me hold only not remind derartiges time somewhere needed to have.
 
11/13/07  
 




Frank
Abbing
then hantierst You not often with Floats. attempt still only time, two Floats on equality To Verify. the alone can already angry into pants weg, if You with the numbers before calculated have. too for drop would the new Operator suitable.
 
11/13/07  
 




RGH
Hello Frank,
your example went too so:
CompileMarkSeparation
Var x!=1.573525
Var y!=1.573524

WhileLoop 100

    If Round(y!,7) = Round(x!,7)

        Print x!, y!

    EndIf

    x!=x!+0.0000001
    y!=y!+0.00000015

Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
11/13/07  
 



@Frank: I handtiere often with Floats, too with the Kalkulation of Zahlenreihen and tables How z.B. Preisberechnungsblättern and/or Abrechnungsformularen. I use if at all Round.
 
11/13/07  
 




Frank
Abbing

it has already its sense, that The Round-function on a arbitrary amount Nachkommastellen rounds can!


likes his. but Please create too time one simples example, circa two arbitrary Floats on equality To Verify. two Floats, The not gerundet go can.
 
11/13/07  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.860 Views

Untitledvor 0 min.
Walter12/03/20
iF12/01/14
holmol9305/30/13
RICOSCH11/29/11

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie