Bug 283864 - kmplot does not recognize the cosecant function.
Summary: kmplot does not recognize the cosecant function.
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Klaus-Dieter M
Depends on:
Reported: 2011-10-12 15:02 UTC by Brian Cheng
Modified: 2011-10-12 22:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

screenshot of kmplot (81.12 KB, image/png)
2011-10-12 15:02 UTC, Brian Cheng

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Cheng 2011-10-12 15:02:17 UTC
Created attachment 64462 [details]
screenshot of kmplot

Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

When typing in cosec(x), kmplot does not recognize cosec(x) and instead sees (cos)ec(x). And so, all cosec-based function is unusable, including cosech, arccosech, arccosec. This problem is still present in latest trunk build as of 08/12/2011, which is where I got the sources.

Reproducible: Always

Steps to Reproduce:
1. Open kmplot
2. type cosec(x)
3. the function will not be recognized by the parser.

Actual Results:  
the cosec(x) function will not graph due a perceived error in the function, even if I use the equation editor to enter cosec(x).

Expected Results:  
It should have been the same graph as 1/sin(x)

OS: Linux (i686) release
Compiler: gcc
Comment 1 Christoph Feck 2011-10-12 22:56:14 UTC
Git commit 10174f8bcf30ccc3071e175bd9c26d91bf595b38 by Christoph Feck.
Committed on 13/10/2011 at 00:51.
Pushed by cfeck into branch 'master'.

Fix function table sorting

* fix ordering of trig functions (longest names first), so that
  "cos" does not shadow "cosec" etc. functions
* only sort function names for display, otherwise breaks highlighter

BUG: 283864
BUG: 228752

M  +3    -1    kmplot/equationeditorwidget.cpp
M  +8    -9    kmplot/parser.cpp