bug in Sequence command

Niek Sprakel shared this question 3 years ago
Answered

Hi.

There seems to be a bug in the Sequence command when I use a conditional expression that involves both the iteration variable and the limit variable.

At first it seems to work but then it's no longer possible to modify the Sequence command by clicking on it. Bug can be reproduced in the online version of GeoGebra.

greetings and thanks in advance for any feedback, Niek

Comments (12)

photo
1

Hi,

The Sequence : Séquence(Si(p ≠ v, (p, p), (p / 2, p)), p, 1, v) works properly

and give the list : {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (3, 6)} for v=6

Version Geogebra ; 5.0.570.0-d

photo
1

Please describe exactly

* what you get

* what you think you should get

photo
1

What I want is a Sequence with a variable limit (so I have a slider to set a variable v for the limit) and I want to use a conditional statement in the sequence expression to distinguish between the last item in the sequence and all other items in the sequence.

In the example ggb file attached in my posting, I generate a sequence of points with an iteration variable p, where all items generated in the sequence are points (p,p) except for the last item in the sequence that is the point (p/2, p).

Visually it seems to work, since it displays the points I was expecting to get (as visible in the screenshot):

https://i.imgur.com/RuQO2sE.png

But then when I try to change something about the sequence command by clicking on it, I don't get the prompt allowing me to modify the expression, but it displays an empty box where previously the Sequence command was visible (as visible in the next screenshot):

https://i.imgur.com/2oF4Evp.png


This happens for me when opening the ggb file in the online version of GeoGebra (https://www.geogebra.org/graphing).

photo
1

I confirm that in my environment (Windows 10, Chrome, GGB 6.0.570 WEB) it is not possible to change/update the definition of sequence "l1" in the Algebraview in the attached file above "geogebra-test-sequence-bug.ggb"

I think it's a bug.


Workaround (if object is visible)


  • activate View/Input-Bar
  • mark object in Graphic (the points)
  • press F3

photo
1

The workaround doesn't seem to work for me. Also, while I'm able to access the settings and delete the entry with the sequence expression via the menu behind the dots on the right side of the item, I can't duplicate it via that menu.

https://i.imgur.com/Zmm5rMV.png

photo
photo
1

Hi,

All the values of the cursor v should be integer as :

Min value = 1

Max value = 10

Increment = 1

So you need to update the properties of cursor v.

Then you will get all the points.

photo
1

https://i.imgur.com/mH5LkCf.png

If I inspect the properties for the slider it already seems v only takes on integer values between 1 and 10. Also, I can change the slider and the sequence behaves as expected, but it still doesn't allow me to click on the sequence command to change anything about it.

photo
1

In Geogebra classic mod

Right click mouse on the sequence permit you to update it.

Look at the pictures joined.

photo
1

Ah ok yes, in the item's settings the definition can be modified. But it still seems there is a bug, because somehow the item can't be duplicated or modified in the usual way in the CAS window.


Oh, I see duplicate does work, it's just confusing that it doesn't display the duplicated expression, but once you click somewhere else the duplicate does show up.

photo
1

As a workaround, try changing


p≠v
to

!(p==v)

photo
1

or l1=Sequence(If(p≟v,((p)/(2),p),(p,p)),p,1,v)

photo
1

Oh right, those workarounds resolve the issue. Still strange though that such subtle changes make the difference between GeoGebra malfunctioning or working properly.

© 2023 International GeoGebra Institute