Properties
Category
Spanish
Similar Topics
Statistics
Comments
7
Participants
4
Subscribers
3
Votes
1
Views
113
Share
Answered
Buenas noches. ¿Existe alguna manera de discriminar si la entrada en f(x) es un número par, o impar? Por ejemplo en la siguiente función
Si x es par, 1
Si x es impar, -1
Todo ello en la misma función f(x)
Gracias de antemano.
- 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
tal vez usted está buscando la siguiente función
f(x) = If(floor(x / 2) * 2 ≟ floor(x), 1, -1)
Note: Mod() no trabaja en funciones
Slightly more robust in case a number is from a calculation eg 7.99999999998
Trick without If()
Thank you both for your prompt reply. This es the mathematical function I’m trying to solve:
o sea, la que ha sugerido RAMI
Gracias mathmagic. Efectivamente es la de RAMI. Lo acabo de comprobar en GG
Buenas noches mathmagic. Como te dije antes, efectivamente la instrucción Si condicional......ha funcionado perfectamente. Adjunto fichero del ejercicio. No obstante hay algo que no me deja tranquilo porque no entiendo la lógica que aplica. ¿Sería mucho pedir que me ayudaras a entenderlo paso a paso?
Si(floor(x / 2) * 2 == floor(x), 1, -1)
Gracias
Comments have been locked on this page!