Simplification does not evaluate when it should

Bug #71499 reported by Gustavo Carneiro on 2006-11-12
Affects Status Importance Assigned to Milestone
NumExp Core

Bug Description

I type:
The result is:
(no help is shown)

Another example:
in: x=5
out: 5
in: sin[x]
out: sin[5]

IMHO, when all parameters of a function have a known value, it should be simplified to the result of its evaluation.

David Boucher (bouda1) wrote :

I'm agree about the help function. Should be fixed very quickly.

But I'm not agree for sin[5] since the evaluation of sin[5] is not an exact value.

We have the same problem with sqrt[12], I would like it to return 2sqrt[3] not just its evaluation.

David Boucher (bouda1) wrote :

I don't understand the problem with the help function.

With numexp-client, it works like you ask :

::> import["gsl"]
::> help[gsl::ln::ln]

Numexp Helpln

     This function computes the logarithm of X,
      for x > 0.

    X (REAL) X value

    Logarith for a complex value. The result imaginary
    part lies in the range

    X (COMPLEX) X value


But through gnumexp, I get the same result as yours.

David Boucher (bouda1) wrote :

The help function is redefined by gnumexp and the Numexp::Kernel::registerClientFunction registered only the function in eval mode. That's why it didn't work with the simplification.

The patch is commited on the svn repository.

Can we mark this bug as solved ? :-)

Changed in numexp-core:
importance: Undecided → Medium
status: Unconfirmed → Fix Committed
Gustavo Carneiro (gjc) wrote :

No, we cannot mark as solved.

I think we all agree there is a problem. What you discovered (thanks for that :-) is that the source of problem is in gnumexp, not numexp-core, so the correct thing to do is to reassign the bug to gnumexp.

Gustavo Carneiro (gjc) wrote :

Oh.. sorry, I read your comment all wrong. I thought you didn't change any code, but you committed something fix it. Thanks.

Gustavo Carneiro (gjc) wrote :

/me confirms the fix.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers