Simplification does not evaluate when it should

Bug #71499 reported by Gustavo Carneiro
2
Affects Status Importance Assigned to Milestone
NumExp Core
Fix Committed
Medium
Unassigned

Bug Description

I type:
  help[gsl::ln::ln]
The result is:
  help[gsl::ln::ln]
(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.

Revision history for this message
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.

Revision history for this message
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,
     ln(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.

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

/me confirms the fix.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.