increasing_power()

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

increasing_power()

Message par compsystems » ven. déc. 28, 2018 3:33 pm

◉ increasing_power(0) [↵]
◉ x^3 - 6*x² + 11*x -6 [↵] returns x^3 - 6*x^2 + 11*x -6
◉ increasing_power() [↵] returns 0


◉ increasing_power(1) [↵]
◉ x^3 - 6*x² + 11*x -6 [↵] retorna -6+11*x-6*x^2+x^3
◉ increasing_power() [↵] returns 0 // must return 1, to determine its status within a program code, although I like it more than to return true/false,


true for 'increasing'
false for 'decreasing'

this gives self-documentation to the code, And closer to natural language, not so computerized.

if increasing_power()==true then ...

although simplified we know that there is no need to make the comparison (==true), it is only for the purpose of showing a more explicit code

parisse
Messages : 5740
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: increasing_power()

Message par parisse » ven. déc. 28, 2018 9:07 pm

increasing_power() is incorrecting returning all_trig_solutions, I will fix that.

Répondre