gogotanaka / hilbert

:dancers: Implement mathematics.
http://hilbert-lang.org/
553 stars 36 forks source link

Unable to evaluate or differentiate expressions of trigonometric functions #76

Open jackmaney opened 9 years ago

jackmaney commented 9 years ago
Hi guys,thank you for using Hilbert.
You need to execute "postulate zfc_analysis" if you wanna do real analysis.

Enjoy! -> postulate zfc_analysis
success! :)
Enjoy! -> (sin(1))^2 + (cos(1))^2
I'm so sorry, something wrong. Please feel free to report this.
Enjoy! -> sin(1)
sin( 1 )
Enjoy! -> sin(1.0)
sin( 1.0 )
Enjoy! ->
jackmaney commented 9 years ago

Oh boy...

Hi guys,thank you for using Hilbert.
You need to execute "postulate zfc_analysis" if you wanna do real analysis.

Enjoy! -> postulate zfc_analysis
success! :)
Enjoy! -> d/dx ( sin(x) )^2 + ( cos(x) )^2
( ( 2cos( x ) )sin( x ) ) + ( ( sin( x ) - 2 )cos( x ) )
Enjoy! ->

This is completely incorrect. The answer produced above simplifies to 3*sin(x)*cos(x) - 2*cos(x), which is clearly not the correct answer (namely zero).

gogotanaka commented 9 years ago

@jackmaney thank you for reporting. your thought is totally correct. I need to find solution to the root of the problem.