Properties
Similar Topics
Statistics
Comments
9
Participants
4
Subscribers
4
Votes
1
Views
68
Share
Answered
In the example below the input box is related to b=?, a=random({2,sqrt(2)}), and c is a==b.
I do not understand why c=false when the the input is sqrt(2) and a=sqrt(2).
Please help me out! Thanks!
Files:
boolean value p...
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2021 International GeoGebra Institute
your attachment doesn't quite match your description.
however sqrt(2) != 1.41 because sqrt(2) == 1.414213562373095 (although only 1.41 is displayed, depending on the round)
A Possible Solution
c = abs(sqrt(a) - b) < 0.005
The value entered in the input box is sqrt(2): the value of a is also sqrt(2), so c which is sqrt(2)==sqrt(2) is false !!! This is embarrassing me! For the moment I'm still trying to understand why the return for a==a is false.
Many thanks!
on my system I have no problems with the version in the attachment.
ggb5.0.620 windows 10 and ggb6.0.620 classic WEB chrome windows 10
the value is true typing sqrt(2) in input box . I have not problem
One more example shows what my question is:
In the attachment f=sqrt(13), a=? is the undefined variable related to the input box, and b is a==f.
If we input for a ( in the input box ) sqrt(13), b says sqrt(13)==sqrt(13) is false! Unbelievable!!!
What's wrong ?!
Thanks again!
Input Box -> Object Properties -> Algebra -> Symbolic will make it work like you want
I think the following is wrong:
quote: "If we input for a ( in the input box ) sqrt(13)"
--------------------------
give in a the same as in the input-box (f) and the boolean b is true.
example: a=sqrt(13) input-box=sqrt(13)
BUT!!!! If you give 2 time enter in the InputBox then f is not sqrt(13)
This is the reason why the input box is normally used as in the attachment.
-------------------------------------
Addendum:
I think Michael Borcherds version is (usually) better
Comments have been locked on this page!