summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2010-02-04 18:06:18 +0100
committerClément DAVID <clement.david@scilab.org>2010-02-04 18:06:18 +0100
commit2b44db7fc1b378ba517b58af9f43baa516fbd30e (patch)
tree78205729c50d07dc790cc2aaa8b714dcada364f2 /scilab/modules
parent12c46edbc61501d031e9662b5556ecfa8ff8955d (diff)
parent9632b35da333e069b672cbd677da3ef97f3fc69c (diff)
downloadscilab-2b44db7fc1b378ba517b58af9f43baa516fbd30e.zip
scilab-2b44db7fc1b378ba517b58af9f43baa516fbd30e.tar.gz
Merge branch '5.2'
Conflicts: scilab/configure scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/RegionToSuperblockAction.java scilab/modules/xcos/src/java/org/scilab/modules/xcos/palette/actions/ViewPaletteBrowserAction.java
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/Makefile.in1
-rw-r--r--scilab/modules/action_binding/Makefile.in1
-rw-r--r--scilab/modules/api_scilab/Makefile.in1
-rw-r--r--scilab/modules/arnoldi/Makefile.in1
-rw-r--r--scilab/modules/atoms/Makefile.in1
-rw-r--r--scilab/modules/boolean/Makefile.in1
-rw-r--r--scilab/modules/cacsd/Makefile.in1
-rw-r--r--scilab/modules/call_scilab/Makefile.in1
-rw-r--r--scilab/modules/compatibility_functions/Makefile.in1
-rw-r--r--scilab/modules/completion/Makefile.in1
-rw-r--r--scilab/modules/console/Makefile.in1
-rw-r--r--scilab/modules/core/Makefile.in1
-rw-r--r--scilab/modules/data_structures/Makefile.in1
-rw-r--r--scilab/modules/demo_tools/Makefile.in1
-rw-r--r--scilab/modules/development_tools/Makefile.in1
-rw-r--r--scilab/modules/development_tools/src/fake/Makefile.in1
-rw-r--r--scilab/modules/differential_equations/Makefile.in1
-rw-r--r--scilab/modules/double/Makefile.in1
-rw-r--r--scilab/modules/dynamic_link/Makefile.in1
-rw-r--r--scilab/modules/elementary_functions/Makefile.in1
-rw-r--r--scilab/modules/elementary_functions/macros/tand.sci26
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/tand.dia.ref824
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/tand.tst825
-rw-r--r--scilab/modules/fftw/Makefile.in1
-rw-r--r--scilab/modules/fileio/Makefile.in1
-rw-r--r--scilab/modules/functions/Makefile.in1
-rw-r--r--scilab/modules/genetic_algorithms/Makefile.in1
-rw-r--r--scilab/modules/graphic_export/Makefile.in1
-rw-r--r--scilab/modules/graphics/Makefile.in1
-rw-r--r--scilab/modules/gui/Makefile.in1
-rw-r--r--scilab/modules/hdf5/Makefile.in1
-rw-r--r--scilab/modules/helptools/Makefile.in1
-rw-r--r--scilab/modules/history_manager/Makefile.in1
-rw-r--r--scilab/modules/integer/Makefile.in1
-rw-r--r--scilab/modules/interpolation/Makefile.in1
-rw-r--r--scilab/modules/intersci/Makefile.in1
-rw-r--r--scilab/modules/io/Makefile.in1
-rw-r--r--scilab/modules/javasci/Makefile.in1
-rw-r--r--scilab/modules/jvm/Makefile.in1
-rw-r--r--scilab/modules/linear_algebra/Makefile.in1
-rw-r--r--scilab/modules/localization/Makefile.in1
-rw-r--r--scilab/modules/m2sci/Makefile.in1
-rw-r--r--scilab/modules/maple2scilab/Makefile.in1
-rw-r--r--scilab/modules/matio/Makefile.in1
-rw-r--r--scilab/modules/mexlib/Makefile.in1
-rw-r--r--scilab/modules/optimization/Makefile.in1
-rw-r--r--scilab/modules/output_stream/Makefile.in1
-rw-r--r--scilab/modules/overloading/Makefile.in1
-rw-r--r--scilab/modules/parameters/Makefile.in1
-rw-r--r--scilab/modules/polynomials/Makefile.in1
-rw-r--r--scilab/modules/pvm/Makefile.in1
-rw-r--r--scilab/modules/randlib/Makefile.in1
-rw-r--r--scilab/modules/renderer/Makefile.in1
-rw-r--r--scilab/modules/renderer/src/java/org/scilab/modules/renderer/polylineDrawing/PolylineLineDrawerGL.java12
-rw-r--r--scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/geom3D/GeomAlgos.java37
-rw-r--r--scilab/modules/renderer/tests/nonreg_tests/bug_6558.tst26
-rw-r--r--scilab/modules/scicos/Makefile.in1
-rw-r--r--scilab/modules/scicos_blocks/Makefile.in1
-rw-r--r--scilab/modules/shell/Makefile.in1
-rw-r--r--scilab/modules/signal_processing/Makefile.in1
-rw-r--r--scilab/modules/simulated_annealing/Makefile.in1
-rw-r--r--scilab/modules/sound/Makefile.in1
-rw-r--r--scilab/modules/sparse/Makefile.in3
-rw-r--r--scilab/modules/special_functions/Makefile.in1
-rw-r--r--scilab/modules/spreadsheet/Makefile.in1
-rw-r--r--scilab/modules/statistics/Makefile.in1
-rw-r--r--scilab/modules/string/Makefile.in1
-rw-r--r--scilab/modules/symbolic/Makefile.in1
-rw-r--r--scilab/modules/tclsci/Makefile.in1
-rw-r--r--scilab/modules/texmacs/Makefile.in1
-rw-r--r--scilab/modules/time/Makefile.in1
-rw-r--r--scilab/modules/umfpack/Makefile.in1
-rw-r--r--scilab/modules/windows_tools/Makefile.in1
-rw-r--r--scilab/modules/xcos/Makefile.in1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java5
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CopyAction.java3
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CutAction.java3
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DeleteAction.java3
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GroupAction.java4
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/InvertSelectionAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/PasteAction.java3
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/RedoAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/SelectAllAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UnGroupAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UndoAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomInAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java1
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/DefaultAction.java (renamed from scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DefaultAction.java)39
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/GraphActionManager.java (renamed from scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GraphActionFactory.java)8
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/MultiSelectionDependantAction.java76
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/SelectionDependantAction.java77
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseViewportAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java23
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java9
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ExportAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/FitDiagramToViewAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/LinkStyleAction.java12
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/NewDiagramAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/NormalViewAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/OpenAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/PrintAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/QuitAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/RecentFileAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SaveAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SaveAsAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SetContextAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SetupAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ShowHideShadowAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/StartAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/StopAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ViewDiagramBrowserAction.java14
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ViewGridAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ViewViewportAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/XcosDemonstrationsAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/XcosDocumentationAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/BasicBlock.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/TextBlock.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/BlockDocumentationAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/BlockParametersAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/BorderColorAction.java14
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/FilledColorAction.java14
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/FlipAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/MirrorAction.java14
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/RegionToSuperblockAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/RotateAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/ShowParentAction.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/SuperblockMaskCreateAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/SuperblockMaskCustomizeAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/SuperblockMaskRemoveAction.java2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/ViewDetailsAction.java18
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/alignement/AlignBlockAction.java16
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/palette/actions/ClosePalettesAction.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/palette/actions/LoadAsPalAction.java14
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/palette/actions/NewPaletteAction.java15
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/palette/actions/ViewPaletteBrowserAction.java17
-rw-r--r--scilab/modules/xpad/Makefile.in1
141 files changed, 1513 insertions, 981 deletions
diff --git a/scilab/modules/Makefile.in b/scilab/modules/Makefile.in
index 67c1d96..92f0882 100644
--- a/scilab/modules/Makefile.in
+++ b/scilab/modules/Makefile.in
@@ -282,6 +282,7 @@ LD = @LD@
282LDFLAGS = @LDFLAGS@ 282LDFLAGS = @LDFLAGS@
283LIBICONV = @LIBICONV@ 283LIBICONV = @LIBICONV@
284LIBINTL = @LIBINTL@ 284LIBINTL = @LIBINTL@
285LIBM = @LIBM@
285LIBOBJS = @LIBOBJS@ 286LIBOBJS = @LIBOBJS@
286LIBS = @LIBS@ 287LIBS = @LIBS@
287LIBTOOL = @LIBTOOL@ 288LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/action_binding/Makefile.in b/scilab/modules/action_binding/Makefile.in
index 1e3da63..163ff0a 100644
--- a/scilab/modules/action_binding/Makefile.in
+++ b/scilab/modules/action_binding/Makefile.in
@@ -247,6 +247,7 @@ LD = @LD@
247LDFLAGS = @LDFLAGS@ 247LDFLAGS = @LDFLAGS@
248LIBICONV = @LIBICONV@ 248LIBICONV = @LIBICONV@
249LIBINTL = @LIBINTL@ 249LIBINTL = @LIBINTL@
250LIBM = @LIBM@
250LIBOBJS = @LIBOBJS@ 251LIBOBJS = @LIBOBJS@
251LIBS = @LIBS@ 252LIBS = @LIBS@
252LIBTOOL = @LIBTOOL@ 253LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/api_scilab/Makefile.in b/scilab/modules/api_scilab/Makefile.in
index c8912dc..e3d3268 100644
--- a/scilab/modules/api_scilab/Makefile.in
+++ b/scilab/modules/api_scilab/Makefile.in
@@ -241,6 +241,7 @@ LD = @LD@
241LDFLAGS = @LDFLAGS@ 241LDFLAGS = @LDFLAGS@
242LIBICONV = @LIBICONV@ 242LIBICONV = @LIBICONV@
243LIBINTL = @LIBINTL@ 243LIBINTL = @LIBINTL@
244LIBM = @LIBM@
244LIBOBJS = @LIBOBJS@ 245LIBOBJS = @LIBOBJS@
245LIBS = @LIBS@ 246LIBS = @LIBS@
246LIBTOOL = @LIBTOOL@ 247LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/arnoldi/Makefile.in b/scilab/modules/arnoldi/Makefile.in
index fc38387..d839ccb 100644
--- a/scilab/modules/arnoldi/Makefile.in
+++ b/scilab/modules/arnoldi/Makefile.in
@@ -263,6 +263,7 @@ LD = @LD@
263LDFLAGS = @LDFLAGS@ 263LDFLAGS = @LDFLAGS@
264LIBICONV = @LIBICONV@ 264LIBICONV = @LIBICONV@
265LIBINTL = @LIBINTL@ 265LIBINTL = @LIBINTL@
266LIBM = @LIBM@
266LIBOBJS = @LIBOBJS@ 267LIBOBJS = @LIBOBJS@
267LIBS = @LIBS@ 268LIBS = @LIBS@
268LIBTOOL = @LIBTOOL@ 269LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/atoms/Makefile.in b/scilab/modules/atoms/Makefile.in
index 51a666c..99de7ef 100644
--- a/scilab/modules/atoms/Makefile.in
+++ b/scilab/modules/atoms/Makefile.in
@@ -203,6 +203,7 @@ LD = @LD@
203LDFLAGS = @LDFLAGS@ 203LDFLAGS = @LDFLAGS@
204LIBICONV = @LIBICONV@ 204LIBICONV = @LIBICONV@
205LIBINTL = @LIBINTL@ 205LIBINTL = @LIBINTL@
206LIBM = @LIBM@
206LIBOBJS = @LIBOBJS@ 207LIBOBJS = @LIBOBJS@
207LIBS = @LIBS@ 208LIBS = @LIBS@
208LIBTOOL = @LIBTOOL@ 209LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/boolean/Makefile.in b/scilab/modules/boolean/Makefile.in
index a1dbb01..6a0dc7e 100644
--- a/scilab/modules/boolean/Makefile.in
+++ b/scilab/modules/boolean/Makefile.in
@@ -242,6 +242,7 @@ LD = @LD@
242LDFLAGS = @LDFLAGS@ 242LDFLAGS = @LDFLAGS@
243LIBICONV = @LIBICONV@ 243LIBICONV = @LIBICONV@
244LIBINTL = @LIBINTL@ 244LIBINTL = @LIBINTL@
245LIBM = @LIBM@
245LIBOBJS = @LIBOBJS@ 246LIBOBJS = @LIBOBJS@
246LIBS = @LIBS@ 247LIBS = @LIBS@
247LIBTOOL = @LIBTOOL@ 248LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/cacsd/Makefile.in b/scilab/modules/cacsd/Makefile.in
index 50c18fa..a15defb 100644
--- a/scilab/modules/cacsd/Makefile.in
+++ b/scilab/modules/cacsd/Makefile.in
@@ -337,6 +337,7 @@ LD = @LD@
337LDFLAGS = @LDFLAGS@ 337LDFLAGS = @LDFLAGS@
338LIBICONV = @LIBICONV@ 338LIBICONV = @LIBICONV@
339LIBINTL = @LIBINTL@ 339LIBINTL = @LIBINTL@
340LIBM = @LIBM@
340LIBOBJS = @LIBOBJS@ 341LIBOBJS = @LIBOBJS@
341LIBS = @LIBS@ 342LIBS = @LIBS@
342LIBTOOL = @LIBTOOL@ 343LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/call_scilab/Makefile.in b/scilab/modules/call_scilab/Makefile.in
index 522d64e..0c62abd 100644
--- a/scilab/modules/call_scilab/Makefile.in
+++ b/scilab/modules/call_scilab/Makefile.in
@@ -238,6 +238,7 @@ LD = @LD@
238LDFLAGS = @LDFLAGS@ 238LDFLAGS = @LDFLAGS@
239LIBICONV = @LIBICONV@ 239LIBICONV = @LIBICONV@
240LIBINTL = @LIBINTL@ 240LIBINTL = @LIBINTL@
241LIBM = @LIBM@
241LIBOBJS = @LIBOBJS@ 242LIBOBJS = @LIBOBJS@
242LIBS = @LIBS@ 243LIBS = @LIBS@
243LIBTOOL = @LIBTOOL@ 244LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/compatibility_functions/Makefile.in b/scilab/modules/compatibility_functions/Makefile.in
index 916059b..11ac5cf 100644
--- a/scilab/modules/compatibility_functions/Makefile.in
+++ b/scilab/modules/compatibility_functions/Makefile.in
@@ -202,6 +202,7 @@ LD = @LD@
202LDFLAGS = @LDFLAGS@ 202LDFLAGS = @LDFLAGS@
203LIBICONV = @LIBICONV@ 203LIBICONV = @LIBICONV@
204LIBINTL = @LIBINTL@ 204LIBINTL = @LIBINTL@
205LIBM = @LIBM@
205LIBOBJS = @LIBOBJS@ 206LIBOBJS = @LIBOBJS@
206LIBS = @LIBS@ 207LIBS = @LIBS@
207LIBTOOL = @LIBTOOL@ 208LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/completion/Makefile.in b/scilab/modules/completion/Makefile.in
index b25d471..94792ce 100644
--- a/scilab/modules/completion/Makefile.in
+++ b/scilab/modules/completion/Makefile.in
@@ -264,6 +264,7 @@ LD = @LD@
264LDFLAGS = @LDFLAGS@ 264LDFLAGS = @LDFLAGS@
265LIBICONV = @LIBICONV@ 265LIBICONV = @LIBICONV@
266LIBINTL = @LIBINTL@ 266LIBINTL = @LIBINTL@
267LIBM = @LIBM@
267LIBOBJS = @LIBOBJS@ 268LIBOBJS = @LIBOBJS@
268LIBS = @LIBS@ 269LIBS = @LIBS@
269LIBTOOL = @LIBTOOL@ 270LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/console/Makefile.in b/scilab/modules/console/Makefile.in
index 2c385d0..4a2e3d4 100644
--- a/scilab/modules/console/Makefile.in
+++ b/scilab/modules/console/Makefile.in
@@ -276,6 +276,7 @@ LD = @LD@
276LDFLAGS = @LDFLAGS@ 276LDFLAGS = @LDFLAGS@
277LIBICONV = @LIBICONV@ 277LIBICONV = @LIBICONV@
278LIBINTL = @LIBINTL@ 278LIBINTL = @LIBINTL@
279LIBM = @LIBM@
279LIBOBJS = @LIBOBJS@ 280LIBOBJS = @LIBOBJS@
280LIBS = @LIBS@ 281LIBS = @LIBS@
281LIBTOOL = @LIBTOOL@ 282LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/core/Makefile.in b/scilab/modules/core/Makefile.in
index e8d515a..c2471ef 100644
--- a/scilab/modules/core/Makefile.in
+++ b/scilab/modules/core/Makefile.in
@@ -475,6 +475,7 @@ LD = @LD@
475LDFLAGS = @LDFLAGS@ 475LDFLAGS = @LDFLAGS@
476LIBICONV = @LIBICONV@ 476LIBICONV = @LIBICONV@
477LIBINTL = @LIBINTL@ 477LIBINTL = @LIBINTL@
478LIBM = @LIBM@
478LIBOBJS = @LIBOBJS@ 479LIBOBJS = @LIBOBJS@
479LIBS = @LIBS@ 480LIBS = @LIBS@
480LIBTOOL = @LIBTOOL@ 481LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/data_structures/Makefile.in b/scilab/modules/data_structures/Makefile.in
index b1eb8e1..53fe905 100644
--- a/scilab/modules/data_structures/Makefile.in
+++ b/scilab/modules/data_structures/Makefile.in
@@ -273,6 +273,7 @@ LD = @LD@
273LDFLAGS = @LDFLAGS@ 273LDFLAGS = @LDFLAGS@
274LIBICONV = @LIBICONV@ 274LIBICONV = @LIBICONV@
275LIBINTL = @LIBINTL@ 275LIBINTL = @LIBINTL@
276LIBM = @LIBM@
276LIBOBJS = @LIBOBJS@ 277LIBOBJS = @LIBOBJS@
277LIBS = @LIBS@ 278LIBS = @LIBS@
278LIBTOOL = @LIBTOOL@ 279LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/demo_tools/Makefile.in b/scilab/modules/demo_tools/Makefile.in
index af7470e..b226ef3 100644
--- a/scilab/modules/demo_tools/Makefile.in
+++ b/scilab/modules/demo_tools/Makefile.in
@@ -201,6 +201,7 @@ LD = @LD@
201LDFLAGS = @LDFLAGS@ 201LDFLAGS = @LDFLAGS@
202LIBICONV = @LIBICONV@ 202LIBICONV = @LIBICONV@
203LIBINTL = @LIBINTL@ 203LIBINTL = @LIBINTL@
204LIBM = @LIBM@
204LIBOBJS = @LIBOBJS@ 205LIBOBJS = @LIBOBJS@
205LIBS = @LIBS@ 206LIBS = @LIBS@
206LIBTOOL = @LIBTOOL@ 207LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/development_tools/Makefile.in b/scilab/modules/development_tools/Makefile.in
index a6c82ef..1eecddc 100644
--- a/scilab/modules/development_tools/Makefile.in
+++ b/scilab/modules/development_tools/Makefile.in
@@ -200,6 +200,7 @@ LD = @LD@
200LDFLAGS = @LDFLAGS@ 200LDFLAGS = @LDFLAGS@
201LIBICONV = @LIBICONV@ 201LIBICONV = @LIBICONV@
202LIBINTL = @LIBINTL@ 202LIBINTL = @LIBINTL@
203LIBM = @LIBM@
203LIBOBJS = @LIBOBJS@ 204LIBOBJS = @LIBOBJS@
204LIBS = @LIBS@ 205LIBS = @LIBS@
205LIBTOOL = @LIBTOOL@ 206LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/development_tools/src/fake/Makefile.in b/scilab/modules/development_tools/src/fake/Makefile.in
index a904129..7e6d748 100644
--- a/scilab/modules/development_tools/src/fake/Makefile.in
+++ b/scilab/modules/development_tools/src/fake/Makefile.in
@@ -151,6 +151,7 @@ LD = @LD@
151LDFLAGS = @LDFLAGS@ 151LDFLAGS = @LDFLAGS@
152LIBICONV = @LIBICONV@ 152LIBICONV = @LIBICONV@
153LIBINTL = @LIBINTL@ 153LIBINTL = @LIBINTL@
154LIBM = @LIBM@
154LIBOBJS = @LIBOBJS@ 155LIBOBJS = @LIBOBJS@
155LIBS = @LIBS@ 156LIBS = @LIBS@
156LIBTOOL = @LIBTOOL@ 157LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/differential_equations/Makefile.in b/scilab/modules/differential_equations/Makefile.in
index 8de7549..10a965b 100644
--- a/scilab/modules/differential_equations/Makefile.in
+++ b/scilab/modules/differential_equations/Makefile.in
@@ -284,6 +284,7 @@ LD = @LD@
284LDFLAGS = @LDFLAGS@ 284LDFLAGS = @LDFLAGS@
285LIBICONV = @LIBICONV@ 285LIBICONV = @LIBICONV@
286LIBINTL = @LIBINTL@ 286LIBINTL = @LIBINTL@
287LIBM = @LIBM@
287LIBOBJS = @LIBOBJS@ 288LIBOBJS = @LIBOBJS@
288LIBS = @LIBS@ 289LIBS = @LIBS@
289LIBTOOL = @LIBTOOL@ 290LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/double/Makefile.in b/scilab/modules/double/Makefile.in
index de4a33d..6a904b4 100644
--- a/scilab/modules/double/Makefile.in
+++ b/scilab/modules/double/Makefile.in
@@ -242,6 +242,7 @@ LD = @LD@
242LDFLAGS = @LDFLAGS@ 242LDFLAGS = @LDFLAGS@
243LIBICONV = @LIBICONV@ 243LIBICONV = @LIBICONV@
244LIBINTL = @LIBINTL@ 244LIBINTL = @LIBINTL@
245LIBM = @LIBM@
245LIBOBJS = @LIBOBJS@ 246LIBOBJS = @LIBOBJS@
246LIBS = @LIBS@ 247LIBS = @LIBS@
247LIBTOOL = @LIBTOOL@ 248LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/dynamic_link/Makefile.in b/scilab/modules/dynamic_link/Makefile.in
index aa17267..25bed5d 100644
--- a/scilab/modules/dynamic_link/Makefile.in
+++ b/scilab/modules/dynamic_link/Makefile.in
@@ -259,6 +259,7 @@ LD = @LD@
259LDFLAGS = @LDFLAGS@ 259LDFLAGS = @LDFLAGS@
260LIBICONV = @LIBICONV@ 260LIBICONV = @LIBICONV@
261LIBINTL = @LIBINTL@ 261LIBINTL = @LIBINTL@
262LIBM = @LIBM@
262LIBOBJS = @LIBOBJS@ 263LIBOBJS = @LIBOBJS@
263LIBS = @LIBS@ 264LIBS = @LIBS@
264LIBTOOL = @LIBTOOL@ 265LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/elementary_functions/Makefile.in b/scilab/modules/elementary_functions/Makefile.in
index 9ad3d0a..d231aab 100644
--- a/scilab/modules/elementary_functions/Makefile.in
+++ b/scilab/modules/elementary_functions/Makefile.in
@@ -611,6 +611,7 @@ LD = @LD@
611LDFLAGS = @LDFLAGS@ 611LDFLAGS = @LDFLAGS@
612LIBICONV = @LIBICONV@ 612LIBICONV = @LIBICONV@
613LIBINTL = @LIBINTL@ 613LIBINTL = @LIBINTL@
614LIBM = @LIBM@
614LIBOBJS = @LIBOBJS@ 615LIBOBJS = @LIBOBJS@
615LIBS = @LIBS@ 616LIBS = @LIBS@
616LIBTOOL = @LIBTOOL@ 617LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/elementary_functions/macros/tand.sci b/scilab/modules/elementary_functions/macros/tand.sci
index 43d0219..2394270 100644
--- a/scilab/modules/elementary_functions/macros/tand.sci
+++ b/scilab/modules/elementary_functions/macros/tand.sci
@@ -1,5 +1,6 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) INRIA, Serge Steer 2// Copyright (C) INRIA, Serge Steer
3// Copyright (C) 2010 - DIGITEO - Michael Baudin
3// 4//
4// This file must be used under the terms of the CeCILL. 5// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which 6// This source file is licensed as described in the file COPYING, which
@@ -8,19 +9,18 @@
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9function y = tand(x) 10function y = tand(x)
10// Tangent of x in degrees. 11// Tangent of x in degrees.
11 if ~isreal(x) then 12// tand(x) = tan(x*%pi/180) in the mathematical sense
13// But floating point numbers behave differently.
14// For example, tand(180) = 0 while tan(pi) = -1.225D-16
15 if ( ~isreal(x) ) then
12 error(msprintf(gettext("%s: Wrong type for input argument #%d: Array of reals expected.\n"),"tand",1)); 16 error(msprintf(gettext("%s: Wrong type for input argument #%d: Array of reals expected.\n"),"tand",1));
13 end 17 end
14 18 // Argument reduction toward [-90,90[
15 n = round(x/90); 19 n = round(x/180)
16 x = x - n*90; 20 x = x - n*180
17 z = (x == 0); 21 y = tan(%pi/180*x)
18 m = pmodulo(n,2); 22 // Set all singular points to nan
19 y = x 23 m = pmodulo(x+90,180)
20 y(m==0) = tan(%pi/180*x(m==0)); 24 y(m==0) = %nan
21 if or(m==1) then
22 y(m==1 & ~z) = -1 ./ tan(%pi/180*x(m==1 & ~z));
23 y(m==1 & z & n>=0) = %inf;
24 y(m==1 & z & n<0) = -%inf;
25 end
26endfunction 25endfunction
26
diff --git a/scilab/modules/elementary_functions/tests/unit_tests/tand.dia.ref b/scilab/modules/elementary_functions/tests/unit_tests/tand.dia.ref
index 52d820e..2144325 100644
--- a/scilab/modules/elementary_functions/tests/unit_tests/tand.dia.ref
+++ b/scilab/modules/elementary_functions/tests/unit_tests/tand.dia.ref
@@ -1,394 +1,452 @@
1// ============================================================================= 1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - INRIA - Serge Steer 3// Copyright (C) 2008 - INRIA - Serge Steer
4// Copyright (C) 2010 - DIGITEO - Michael Baudin
4// 5//
5// This file is distributed under the same license as the Scilab package. 6// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 7// =============================================================================
7// <-- JVM NOT MANDATORY --> 8// <-- JVM NOT MANDATORY -->
9//
10// assert_close --
11// Returns 1 if the two real matrices computed and expected are close,
12// i.e. if the relative distance between computed and expected is lesser than epsilon.
13// Arguments
14// computed, expected : the two matrices to compare
15// epsilon : a small number
16//
17function flag = assert_close ( computed, expected, epsilon )
18 if expected==0.0 then
19 shift = norm(computed-expected);
20 else
21 shift = norm(computed-expected)/norm(expected);
22 end
23 if shift < epsilon then
24 flag = 1;
25 else
26 flag = 0;
27 end
28 if flag <> 1 then bugmes();quit;end
29endfunction
30//
31// assert_equal --
32// Returns 1 if the two real matrices computed and expected are equal.
33// Arguments
34// computed, expected : the two matrices to compare
35// epsilon : a small number
36//
37function flag = assert_equal ( computed , expected )
38 if computed==expected then
39 flag = 1;
40 else
41 flag = 0;
42 end
43 if flag <> 1 then bugmes();quit;end
44endfunction
8// Maple code used to create reference 45// Maple code used to create reference
9// Digits := 40; 46// Digits := 40;
10// writeto("tand.ref"); interface(prettyprint = 0); 47// writeto("tand.ref"); interface(prettyprint = 0);
11// for i from 0 to 360 do if ((i<>90) and (i<>270) ) then print(-180+i, evalf[30](tan(-Pi+i*Pi/180), 30)) end end do; 48// for i from 0 to 360 do if ((i<>90) and (i<>270) ) then print(-180+i, evalf[30](tan(-Pi+i*Pi/180), 30)) end end do;
12// writeto(terminal); 49// writeto(terminal);
13ieee(2); 50ieee(2);
14pi=%pi;eps=%eps;Inf=%inf;NaN=%nan; //used to make following code runnable under Matlab 51//used to make following code runnable under Matlab
15ref=[-180, 0. 52pi=%pi;
16-179, 0.174550649282175857651288952197e-1 53eps=%eps;
17-178, 0.349207694917477305004026257737e-1 54Inf=%inf;
18-177, 0.524077792830412040388058244741e-1 55NaN=%nan;
19-176, 0.699268119435104136669210603231e-1 56//
20-175, 0.874886635259240052220186694350e-1 57x = (-180:180)';
21-174, .105104235265676462511502380140 58// Remove 90 (index #91) and -90 (index #271),
22-173, .122784560902904591134231136053 59// where the value is %nan
23-172, .140540834702391446838117693433 60x([91 271]) = [];
24-171, .158384440324536293838883092694 61e=[
25-170, .176326980708464973471090386869 620.
26-169, .194380309137718484243194224977 630.174550649282175857651288952197e-1
27-168, .212556561670022125259591660570 640.349207694917477305004026257737e-1
28-167, .230868191125563111748145613474 650.524077792830412040388058244741e-1
29-166, .249328002843180691624039937805 660.699268119435104136669210603231e-1
30-165, .267949192431122706472553658494 670.874886635259240052220186694350e-1
31-164, .286745385758807940042758062732 68.105104235265676462511502380140
32-163, .305730681458660355734541958996 69.122784560902904591134231136053
33-162, .324919696232906326155871412215 70.140540834702391446838117693433
34-161, .344327613289665241957265839384 71.158384440324536293838883092694
35-160, .363970234266202361351047882776 72.176326980708464973471090386869
36-159, .383864035035415795971448408105 73.194380309137718484243194224977
37-158, .404026225835156811322348143579 74.212556561670022125259591660570
38-157, .424474816209604742023532062943 75.230868191125563111748145613474
39-156, .445228685308536163922367030644 76.249328002843180691624039937805
40-155, .466307658154998592830006194801 77.267949192431122706472553658494
41-154, .487732588565861422773111126616 78.286745385758807940042758062732
42-153, .509525449494428810513706911251 79.305730681458660355734541958996
43-152, .531709431661478748075915871842 80.324919696232906326155871412215
44-151, .554309051452768917820763092337 81.344327613289665241957265839384
45-150, .577350269189625764509148780503 82.363970234266202361351047882776
46-149, .600860619027560414878664426354 83.383864035035415795971448408105
47-148, .624869351909327509780510827950 84.404026225835156811322348143579
48-147, .649407593197510576982062911310 85.424474816209604742023532062943
49-146, .674508516842426632142460861996 86.445228685308536163922367030644
50-145, .700207538209709779458522719443 87.466307658154998592830006194801
51-144, .726542528005360885895466757481 88.487732588565861422773111126616
52-143, .753554050102794157073956448623 89.509525449494428810513706911251
53-142, .781285626506717397062949971961 90.531709431661478748075915871842
54-141, .809784033195007148036991374238 91.554309051452768917820763092337
55-140, .839099631177280011763127298122 92.577350269189625764509148780503
56-139, .869286737816226662200095638705 93.600860619027560414878664426354
57-138, .900404044297839945120477203883 94.624869351909327509780510827950
58-137, .932515086137661705612185627428 95.649407593197510576982062911310
59-136, .965688774807074045958027299699 96.674508516842426632142460861996
60-135, 1. 97.700207538209709779458522719443
61-134, 1.03553031379056950695883255125 98.726542528005360885895466757481
62-133, 1.07236871002468253294602774807 99.753554050102794157073956448623
63-132, 1.11061251482919287014348196417 100.781285626506717397062949971961
64-131, 1.15036840722100955587633102557 101.809784033195007148036991374238
65-130, 1.19175359259420995870530807186 102.839099631177280011763127298122
66-129, 1.23489715653505139855617469537 103.869286737816226662200095638705
67-128, 1.27994163219307878031102984757 104.900404044297839945120477203883
68-127, 1.32704482162041003715947257408 105.932515086137661705612185627428
69-126, 1.37638192047117353820720958191 106.965688774807074045958027299699
70-125, 1.42814800674211450216061848500 1071.
71-124, 1.48256096851274025478715714915 1081.03553031379056950695883255125
72-123, 1.53986496381458290482679697261 1091.07236871002468253294602774807
73-122, 1.60033452904105035532673308117 1101.11061251482919287014348196417
74-121, 1.66427948235051791103049617004 1111.15036840722100955587633102557
75-120, 1.73205080756887729352744634151 1121.19175359259420995870530807186
76-119, 1.80404775527142393738178474825 1131.23489715653505139855617469537
77-118, 1.88072646534633201236083759582 1141.27994163219307878031102984757
78-117, 1.96261050550515058230464042622 1151.32704482162041003715947257408
79-116, 2.05030384157929621689901107053 1161.37638192047117353820720958191
80-115, 2.14450692050955861635626079106 1171.42814800674211450216061848500
81-114, 2.24603677390421605416332143840 1181.48256096851274025478715714915
82-113, 2.35585236582375283393958666236 1191.53986496381458290482679697261
83-112, 2.47508685341629582524001324606 1201.60033452904105035532673308117
84-111, 2.60508906469380153625841233646 1211.66427948235051791103049617004
85-110, 2.74747741945462227876166402648 1221.73205080756887729352744634151
86-109, 2.90421087767582280257932553456 1231.80404775527142393738178474825
87-108, 3.07768353717525340257029057602 1241.88072646534633201236083759582
88-107, 3.27085261848414086530885625734 1251.96261050550515058230464042622
89-106, 3.48741444384090865069622422508 1262.05030384157929621689901107053
90-105, 3.73205080756887729352744634156 1272.14450692050955861635626079106
91-104, 4.01078093353584471634571512944 1282.24603677390421605416332143840
92-103, 4.33147587428415554554616775463 1292.35585236582375283393958666236
93-102, 4.70463010947845423358623453738 1302.47508685341629582524001324606
94-101, 5.14455401597031013472322071724 1312.60508906469380153625841233646
95-100, 5.67128181961770953099441843983 1322.74747741945462227876166402648
96-99, 6.31375151467504309897946424494 1332.90421087767582280257932553456
97-98, 7.11536972238420874823056614360 1343.07768353717525340257029057602
98-97, 8.14434642797459402382566139528 1353.27085261848414086530885625734
99-96, 9.51436445422258492968397145491 1363.48741444384090865069622422508
100-95, 11.4300523027613430672108555485 1373.73205080756887729352744634156
101-94, 14.3006662567119279101280533475 1384.01078093353584471634571512944
102-93, 19.0811366877282110634067487325 1394.33147587428415554554616775463
103-92, 28.6362532829156035507565093210 1404.70463010947845423358623453738
104-91, 57.2899616307594246872781475211 1415.14455401597031013472322071724
105-89, -57.2899616307594246872781475211 1425.67128181961770953099441843983
106-88, -28.6362532829156035507565093210 1436.31375151467504309897946424494
107-87, -19.0811366877282110634067487325 1447.11536972238420874823056614360
108-86, -14.3006662567119279101280533475 1458.14434642797459402382566139528
109-85, -11.4300523027613430672108555485 1469.51436445422258492968397145491
110-84, -9.51436445422258492968397145491 14711.4300523027613430672108555485
111-83, -8.14434642797459402382566139528 14814.3006662567119279101280533475
112-82, -7.11536972238420874823056614360 14919.0811366877282110634067487325
113-81, -6.31375151467504309897946424494 15028.6362532829156035507565093210
114-80, -5.67128181961770953099441843983 15157.2899616307594246872781475211
115-79, -5.14455401597031013472322071724 152-57.2899616307594246872781475211
116-78, -4.70463010947845423358623453738 153-28.6362532829156035507565093210
117-77, -4.33147587428415554554616775463 154-19.0811366877282110634067487325
118-76, -4.01078093353584471634571512944 155-14.3006662567119279101280533475
119-75, -3.73205080756887729352744634156 156-11.4300523027613430672108555485
120-74, -3.48741444384090865069622422508 157-9.51436445422258492968397145491
121-73, -3.27085261848414086530885625734 158-8.14434642797459402382566139528
122-72, -3.07768353717525340257029057602 159-7.11536972238420874823056614360
123-71, -2.90421087767582280257932553456 160-6.31375151467504309897946424494
124-70, -2.74747741945462227876166402648 161-5.67128181961770953099441843983
125-69, -2.60508906469380153625841233646 162-5.14455401597031013472322071724
126-68, -2.47508685341629582524001324606 163-4.70463010947845423358623453738
127-67, -2.35585236582375283393958666236 164-4.33147587428415554554616775463
128-66, -2.24603677390421605416332143840 165-4.01078093353584471634571512944
129-65, -2.14450692050955861635626079106 166-3.73205080756887729352744634156
130-64, -2.05030384157929621689901107053 167-3.48741444384090865069622422508
131-63, -1.96261050550515058230464042622 168-3.27085261848414086530885625734
132-62, -1.88072646534633201236083759582 169-3.07768353717525340257029057602
133-61, -1.80404775527142393738178474825 170-2.90421087767582280257932553456
134-60, -1.73205080756887729352744634151 171-2.74747741945462227876166402648
135-59, -1.66427948235051791103049617004 172-2.60508906469380153625841233646
136-58, -1.60033452904105035532673308117 173-2.47508685341629582524001324606
137-57, -1.53986496381458290482679697261 174-2.35585236582375283393958666236
138-56, -1.48256096851274025478715714915 175-2.24603677390421605416332143840
139-55, -1.42814800674211450216061848500 176-2.14450692050955861635626079106
140-54, -1.37638192047117353820720958191 177-2.05030384157929621689901107053
141-53, -1.32704482162041003715947257408 178-1.96261050550515058230464042622
142-52, -1.27994163219307878031102984757 179-1.88072646534633201236083759582
143-51, -1.23489715653505139855617469537 180-1.80404775527142393738178474825
144-50, -1.19175359259420995870530807186 181-1.73205080756887729352744634151
145-49, -1.15036840722100955587633102557 182-1.66427948235051791103049617004
146-48, -1.11061251482919287014348196417 183-1.60033452904105035532673308117
147-47, -1.07236871002468253294602774807 184-1.53986496381458290482679697261
148-46, -1.03553031379056950695883255125 185-1.48256096851274025478715714915
149-45, -1. 186-1.42814800674211450216061848500
150-44, -.965688774807074045958027299699 187-1.37638192047117353820720958191
151-43, -.932515086137661705612185627428 188-1.32704482162041003715947257408
152-42, -.900404044297839945120477203883 189-1.27994163219307878031102984757
153-41, -.869286737816226662200095638705 190-1.23489715653505139855617469537
154-40, -.839099631177280011763127298122 191-1.19175359259420995870530807186
155-39, -.809784033195007148036991374238 192-1.15036840722100955587633102557
156-38, -.781285626506717397062949971961 193-1.11061251482919287014348196417
157-37, -.753554050102794157073956448623 194-1.07236871002468253294602774807
158-36, -.726542528005360885895466757481 195-1.03553031379056950695883255125
159-35, -.700207538209709779458522719443 196-1.
160-34, -.674508516842426632142460861996 197-.965688774807074045958027299699
161-33, -.649407593197510576982062911310 198-.932515086137661705612185627428
162-32, -.624869351909327509780510827950 199-.900404044297839945120477203883
163-31, -.600860619027560414878664426354 200-.869286737816226662200095638705
164-30, -.577350269189625764509148780503 201-.839099631177280011763127298122
165-29, -.554309051452768917820763092337 202-.809784033195007148036991374238
166-28, -.531709431661478748075915871842 203-.781285626506717397062949971961
167-27, -.509525449494428810513706911251 204-.753554050102794157073956448623
168-26, -.487732588565861422773111126616 205-.726542528005360885895466757481
169-25, -.466307658154998592830006194801 206-.700207538209709779458522719443
170-24, -.445228685308536163922367030644 207-.674508516842426632142460861996
171-23, -.424474816209604742023532062943 208-.649407593197510576982062911310
172-22, -.404026225835156811322348143579 209-.624869351909327509780510827950
173-21, -.383864035035415795971448408105 210-.600860619027560414878664426354
174-20, -.363970234266202361351047882776 211-.577350269189625764509148780503
175-19, -.344327613289665241957265839384 212-.554309051452768917820763092337
176-18, -.324919696232906326155871412215 213-.531709431661478748075915871842
177-17, -.305730681458660355734541958996 214-.509525449494428810513706911251
178-16, -.286745385758807940042758062732 215-.487732588565861422773111126616
179-15, -.267949192431122706472553658494 216-.466307658154998592830006194801
180-14, -.249328002843180691624039937805 217-.445228685308536163922367030644
181-13, -.230868191125563111748145613474 218-.424474816209604742023532062943
182-12, -.212556561670022125259591660570 219-.404026225835156811322348143579
183-11, -.194380309137718484243194224977 220-.383864035035415795971448408105
184-10, -.176326980708464973471090386869 221-.363970234266202361351047882776
185-9, -.158384440324536293838883092694 222-.344327613289665241957265839384
186-8, -.140540834702391446838117693433 223-.324919696232906326155871412215
187-7, -.122784560902904591134231136053 224-.305730681458660355734541958996
188-6, -.105104235265676462511502380140 225-.286745385758807940042758062732
189-5, -0.874886635259240052220186694350e-1 226-.267949192431122706472553658494
190-4, -0.699268119435104136669210603231e-1 227-.249328002843180691624039937805
191-3, -0.524077792830412040388058244741e-1 228-.230868191125563111748145613474
192-2, -0.349207694917477305004026257737e-1 229-.212556561670022125259591660570
193-1, -0.174550649282175857651288952197e-1 230-.194380309137718484243194224977
1940, 0. 231-.176326980708464973471090386869
1951, 0.174550649282175857651288952197e-1 232-.158384440324536293838883092694
1962, 0.349207694917477305004026257737e-1 233-.140540834702391446838117693433
1973, 0.524077792830412040388058244741e-1 234-.122784560902904591134231136053
1984, 0.699268119435104136669210603231e-1 235-.105104235265676462511502380140
1995, 0.874886635259240052220186694350e-1 236-0.874886635259240052220186694350e-1
2006, .105104235265676462511502380140 237-0.699268119435104136669210603231e-1
2017, .122784560902904591134231136053 238-0.524077792830412040388058244741e-1
2028, .140540834702391446838117693433 239-0.349207694917477305004026257737e-1
2039, .158384440324536293838883092694 240-0.174550649282175857651288952197e-1
20410, .176326980708464973471090386869 2410.
20511, .194380309137718484243194224977 2420.174550649282175857651288952197e-1
20612, .212556561670022125259591660570 2430.349207694917477305004026257737e-1
20713, .230868191125563111748145613474 2440.524077792830412040388058244741e-1
20814, .249328002843180691624039937805 2450.699268119435104136669210603231e-1
20915, .267949192431122706472553658494 2460.874886635259240052220186694350e-1
21016, .286745385758807940042758062732 247.105104235265676462511502380140
21117, .305730681458660355734541958996 248.122784560902904591134231136053
21218, .324919696232906326155871412215 249.140540834702391446838117693433
21319, .344327613289665241957265839384 250.158384440324536293838883092694
21420, .363970234266202361351047882776 251.176326980708464973471090386869
21521, .383864035035415795971448408105 252.194380309137718484243194224977
21622, .404026225835156811322348143579 253.212556561670022125259591660570
21723, .424474816209604742023532062943 254.230868191125563111748145613474
21824, .445228685308536163922367030644 255.249328002843180691624039937805
21925, .466307658154998592830006194801 256.267949192431122706472553658494
22026, .487732588565861422773111126616 257.286745385758807940042758062732
22127, .509525449494428810513706911251 258.305730681458660355734541958996
22228, .531709431661478748075915871842 259.324919696232906326155871412215
22329, .554309051452768917820763092337 260.344327613289665241957265839384
22430, .577350269189625764509148780503 261.363970234266202361351047882776
22531, .600860619027560414878664426354 262.383864035035415795971448408105
22632, .624869351909327509780510827950 263.404026225835156811322348143579
22733, .649407593197510576982062911310 264.424474816209604742023532062943
22834, .674508516842426632142460861996 265.445228685308536163922367030644
22935, .700207538209709779458522719443 266.466307658154998592830006194801
23036, .726542528005360885895466757481 267.487732588565861422773111126616
23137, .753554050102794157073956448623 268.509525449494428810513706911251
23238, .781285626506717397062949971961 269.531709431661478748075915871842
23339, .809784033195007148036991374238 270.554309051452768917820763092337
23440, .839099631177280011763127298122 271.577350269189625764509148780503
23541, .869286737816226662200095638705 272.600860619027560414878664426354
23642, .900404044297839945120477203883 273.624869351909327509780510827950
23743, .932515086137661705612185627428 274.649407593197510576982062911310
23844, .965688774807074045958027299699 275.674508516842426632142460861996
23945, 1. 276.700207538209709779458522719443
24046, 1.03553031379056950695883255125 277.726542528005360885895466757481
24147, 1.07236871002468253294602774807 278.753554050102794157073956448623
24248, 1.11061251482919287014348196417 279.781285626506717397062949971961
24349, 1.15036840722100955587633102557 280.809784033195007148036991374238
24450, 1.19175359259420995870530807186 281.839099631177280011763127298122
24551, 1.23489715653505139855617469537 282.869286737816226662200095638705
24652, 1.27994163219307878031102984757 283.900404044297839945120477203883
24753, 1.32704482162041003715947257408 284.932515086137661705612185627428
24854, 1.37638192047117353820720958191 285.965688774807074045958027299699
24955, 1.42814800674211450216061848500 2861.
25056, 1.48256096851274025478715714915 2871.03553031379056950695883255125
25157, 1.53986496381458290482679697261 2881.07236871002468253294602774807
25258, 1.60033452904105035532673308117 2891.11061251482919287014348196417
25359, 1.66427948235051791103049617004 2901.15036840722100955587633102557
25460, 1.73205080756887729352744634151 2911.19175359259420995870530807186
25561, 1.80404775527142393738178474825 2921.23489715653505139855617469537
25662, 1.88072646534633201236083759582 2931.27994163219307878031102984757
25763, 1.96261050550515058230464042622 2941.32704482162041003715947257408
25864, 2.05030384157929621689901107053 2951.37638192047117353820720958191
25965, 2.14450692050955861635626079106 2961.42814800674211450216061848500
26066, 2.24603677390421605416332143840 2971.48256096851274025478715714915
26167, 2.35585236582375283393958666236 2981.53986496381458290482679697261
26268, 2.47508685341629582524001324606 2991.60033452904105035532673308117
26369, 2.60508906469380153625841233646 3001.66427948235051791103049617004
26470, 2.74747741945462227876166402648 3011.73205080756887729352744634151
26571, 2.90421087767582280257932553456 3021.80404775527142393738178474825
26672, 3.07768353717525340257029057602 3031.88072646534633201236083759582
26773, 3.27085261848414086530885625734 3041.96261050550515058230464042622
26874, 3.48741444384090865069622422508 3052.05030384157929621689901107053
26975, 3.73205080756887729352744634156 3062.14450692050955861635626079106
27076, 4.01078093353584471634571512944 3072.24603677390421605416332143840
27177, 4.33147587428415554554616775463 3082.35585236582375283393958666236
27278, 4.70463010947845423358623453738 3092.47508685341629582524001324606
27379, 5.14455401597031013472322071724 3102.60508906469380153625841233646
27480, 5.67128181961770953099441843983 3112.74747741945462227876166402648
27581, 6.31375151467504309897946424494 3122.90421087767582280257932553456
27682, 7.11536972238420874823056614360 3133.07768353717525340257029057602
27783, 8.14434642797459402382566139528 3143.27085261848414086530885625734
27884, 9.51436445422258492968397145491 3153.48741444384090865069622422508
27985, 11.4300523027613430672108555485 3163.73205080756887729352744634156
28086, 14.3006662567119279101280533475 3174.01078093353584471634571512944
28187, 19.0811366877282110634067487325 3184.33147587428415554554616775463
28288, 28.6362532829156035507565093210 3194.70463010947845423358623453738
28389, 57.2899616307594246872781475211 3205.14455401597031013472322071724
28491, -57.2899616307594246872781475211 3215.67128181961770953099441843983
28592, -28.6362532829156035507565093210 3226.31375151467504309897946424494
28693, -19.0811366877282110634067487325 3237.11536972238420874823056614360
28794, -14.3006662567119279101280533475 3248.14434642797459402382566139528
28895, -11.4300523027613430672108555485 3259.51436445422258492968397145491
28996, -9.51436445422258492968397145491 32611.4300523027613430672108555485
29097, -8.14434642797459402382566139528 32714.3006662567119279101280533475
29198, -7.11536972238420874823056614360 32819.0811366877282110634067487325
29299, -6.31375151467504309897946424494 32928.6362532829156035507565093210
293100, -5.67128181961770953099441843983 33057.2899616307594246872781475211
294101, -5.14455401597031013472322071724 331-57.2899616307594246872781475211
295102, -4.70463010947845423358623453738 332-28.6362532829156035507565093210
296103, -4.33147587428415554554616775463 333-19.0811366877282110634067487325
297104, -4.01078093353584471634571512944 334-14.3006662567119279101280533475
298105, -3.73205080756887729352744634156 335-11.4300523027613430672108555485
299106, -3.48741444384090865069622422508 336-9.51436445422258492968397145491
300107, -3.27085261848414086530885625734 337-8.14434642797459402382566139528
301108, -3.07768353717525340257029057602 338-7.11536972238420874823056614360
302109, -2.90421087767582280257932553456 339-6.31375151467504309897946424494
303110, -2.74747741945462227876166402648 340-5.67128181961770953099441843983
304111, -2.60508906469380153625841233646 341-5.14455401597031013472322071724
305112, -2.47508685341629582524001324606 342-4.70463010947845423358623453738
306113, -2.35585236582375283393958666236 343-4.33147587428415554554616775463
307114, -2.24603677390421605416332143840 344-4.01078093353584471634571512944
308115, -2.14450692050955861635626079106 345-3.73205080756887729352744634156
309116, -2.05030384157929621689901107053 346-3.48741444384090865069622422508
310117, -1.96261050550515058230464042622 347-3.27085261848414086530885625734
311118, -1.88072646534633201236083759582 348-3.07768353717525340257029057602
312119, -1.80404775527142393738178474825 349-2.90421087767582280257932553456
313120, -1.73205080756887729352744634151 350-2.74747741945462227876166402648
314121, -1.66427948235051791103049617004 351-2.60508906469380153625841233646
315122, -1.60033452904105035532673308117 352-2.47508685341629582524001324606
316123, -1.53986496381458290482679697261 353-2.35585236582375283393958666236
317124, -1.48256096851274025478715714915 354-2.24603677390421605416332143840
318125, -1.42814800674211450216061848500 355-2.14450692050955861635626079106
319126, -1.37638192047117353820720958191 356-2.05030384157929621689901107053
320127, -1.32704482162041003715947257408 357-1.96261050550515058230464042622
321128, -1.27994163219307878031102984757 358-1.88072646534633201236083759582
322129, -1.23489715653505139855617469537 359-1.80404775527142393738178474825
323130, -1.19175359259420995870530807186 360-1.73205080756887729352744634151
324131, -1.15036840722100955587633102557 361-1.66427948235051791103049617004
325132, -1.11061251482919287014348196417 362-1.60033452904105035532673308117
326133, -1.07236871002468253294602774807 363-1.53986496381458290482679697261
327134, -1.03553031379056950695883255125 364-1.48256096851274025478715714915
328135, -1. 365-1.42814800674211450216061848500
329136, -.965688774807074045958027299699 366-1.37638192047117353820720958191
330137, -.932515086137661705612185627428 367-1.32704482162041003715947257408
331138, -.900404044297839945120477203883 368-1.27994163219307878031102984757
332139, -.869286737816226662200095638705 369-1.23489715653505139855617469537
333140, -.839099631177280011763127298122 370-1.19175359259420995870530807186
334141, -.809784033195007148036991374238 371-1.15036840722100955587633102557
335142, -.781285626506717397062949971961 372-1.11061251482919287014348196417
336143, -.753554050102794157073956448623 373-1.07236871002468253294602774807
337144, -.726542528005360885895466757481 374-1.03553031379056950695883255125
338145, -.700207538209709779458522719443 375-1.
339146, -.674508516842426632142460861996 376-.965688774807074045958027299699
340147, -.649407593197510576982062911310 377-.932515086137661705612185627428
341148, -.624869351909327509780510827950 378-.900404044297839945120477203883
342149, -.600860619027560414878664426354 379-.869286737816226662200095638705
343150, -.577350269189625764509148780503 380-.839099631177280011763127298122
344151, -.554309051452768917820763092337 381-.809784033195007148036991374238
345152, -.531709431661478748075915871842 382-.781285626506717397062949971961
346153, -.509525449494428810513706911251 383-.753554050102794157073956448623
347154, -.487732588565861422773111126616 384-.726542528005360885895466757481
348155, -.466307658154998592830006194801 385-.700207538209709779458522719443
349156, -.445228685308536163922367030644 386-.674508516842426632142460861996
350157, -.424474816209604742023532062943 387-.649407593197510576982062911310
351158, -.404026225835156811322348143579 388-.624869351909327509780510827950
352159, -.383864035035415795971448408105 389-.600860619027560414878664426354
353160, -.363970234266202361351047882776 390-.577350269189625764509148780503
354161, -.344327613289665241957265839384 391-.554309051452768917820763092337
355162, -.324919696232906326155871412215 392-.531709431661478748075915871842
356163, -.305730681458660355734541958996 393-.509525449494428810513706911251
357164, -.286745385758807940042758062732 394-.487732588565861422773111126616
358165, -.267949192431122706472553658494 395-.466307658154998592830006194801
359166, -.249328002843180691624039937805 396-.445228685308536163922367030644
360167, -.230868191125563111748145613474 397-.424474816209604742023532062943
361168, -.212556561670022125259591660570 398-.404026225835156811322348143579
362169, -.194380309137718484243194224977 399-.383864035035415795971448408105
363170, -.176326980708464973471090386869 400-.363970234266202361351047882776
364171, -.158384440324536293838883092694 401-.344327613289665241957265839384
365172, -.140540834702391446838117693433 402-.324919696232906326155871412215
366173, -.122784560902904591134231136053 403-.305730681458660355734541958996
367174, -.105104235265676462511502380140 404-.286745385758807940042758062732
368175, -0.874886635259240052220186694350e-1 405-.267949192431122706472553658494
369176, -0.699268119435104136669210603231e-1 406-.249328002843180691624039937805
370177, -0.524077792830412040388058244741e-1 407-.230868191125563111748145613474
371178, -0.349207694917477305004026257737e-1 408-.212556561670022125259591660570
372179, -0.174550649282175857651288952197e-1 409-.194380309137718484243194224977
373180, 0. 410-.176326980708464973471090386869
411-.158384440324536293838883092694
412-.140540834702391446838117693433
413-.122784560902904591134231136053
414-.105104235265676462511502380140
415-0.874886635259240052220186694350e-1
416-0.699268119435104136669210603231e-1
417-0.524077792830412040388058244741e-1
418-0.349207694917477305004026257737e-1
419-0.174550649282175857651288952197e-1
4200.
374]; 421];
375x=ref(:,1);e=max(abs((ref(:,2)-tand(x)))); 422c = tand(x);
376if e>40*eps then bugmes();quit;end 423assert_close ( c , e , 40 * %eps );
377x=ref(:,1)+2^6*360; e=max(abs((ref(:,2)-tand(x)))); 424// Turn a lot around the circle
378if e>40*eps then bugmes();quit;end 425x1 = x + 2^6*360;
379x=ref(:,1)+2^10*360; e=max(abs((ref(:,2)-tand(x)))); 426c = tand(x1);
380if e>40*eps then bugmes();quit;end 427assert_close ( c , e , 40 * %eps );
381if tand(0)<>0 then bugmes();quit;end 428// Turn a lot around the circle, the other side
382if tand(360)<>0 then bugmes();quit;end 429x2 = x - 2^6*360;
383if tand(-360)<>0 then bugmes();quit;end 430c = tand(x2);
384if tand(90)<>%inf then bugmes();quit;end 431assert_close ( c , e , 40 * %eps );
385if tand(-90)<>-%inf then bugmes();quit;end 432assert_equal ( tand(0) , 0 );
386if tand(180)<>0 then bugmes();quit;end 433assert_equal ( tand(360) , 0 );
387if tand(-180)<>0 then bugmes();quit;end 434assert_equal ( tand(-360) , 0 );
388if tand(270)<>%inf then bugmes();quit;end 435assert_equal ( tand(180) , 0 );
389if tand(-270)<>-%inf then bugmes();quit;end 436assert_equal ( tand(-180) , 0 );
390if or(abs(tand([30 45 60])-[1/sqrt(3) 1 sqrt(3) ])>2*%eps) then bugmes();quit;end 437assert_close ( tand(30) , 1/sqrt(3) , %eps );
391if ~isnan(tand(-Inf)) then bugmes();quit;end 438assert_close ( tand(45) , 1 , 2 * %eps );
392if ~isnan(tand(Inf)) then bugmes();quit;end 439assert_close ( tand(60) , sqrt(3) , 2*%eps );
393if ~isnan(tand(NaN)) then bugmes();quit;end 440assert_equal ( isnan(tand(90)) , %t );
394if tand([])<>[] then bugmes();quit;end 441assert_equal ( isnan(tand(-90)) , %t );
442assert_equal ( isnan(tand(270)) , %t );
443assert_equal ( isnan(tand(-270)) , %t );
444assert_equal ( isnan(tand(-%inf)) , %t );
445assert_equal ( isnan(tand(%inf)) , %t );
446assert_equal ( isnan(tand(%nan)) , %t );
447assert_equal ( tand([]) , [] );
448ieee(0)
449assert_equal ( tand(0) , 0 );
450assert_close ( tand(30) , 1/sqrt(3) , %eps );
451assert_close ( tand(45) , 1 , 2 * %eps );
452assert_close ( tand(60) , sqrt(3) , 2*%eps );
diff --git a/scilab/modules/elementary_functions/tests/unit_tests/tand.tst b/scilab/modules/elementary_functions/tests/unit_tests/tand.tst
index 30f01af..1b88df3 100644
--- a/scilab/modules/elementary_functions/tests/unit_tests/tand.tst
+++ b/scilab/modules/elementary_functions/tests/unit_tests/tand.tst
@@ -1,402 +1,467 @@
1// ============================================================================= 1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008 - INRIA - Serge Steer 3// Copyright (C) 2008 - INRIA - Serge Steer
4// Copyright (C) 2010 - DIGITEO - Michael Baudin
4// 5//
5// This file is distributed under the same license as the Scilab package. 6// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 7// =============================================================================
7 8
8// <-- JVM NOT MANDATORY --> 9// <-- JVM NOT MANDATORY -->
9 10
11//
12// assert_close --
13// Returns 1 if the two real matrices computed and expected are close,
14// i.e. if the relative distance between computed and expected is lesser than epsilon.
15// Arguments
16// computed, expected : the two matrices to compare
17// epsilon : a small number
18//
19function flag = assert_close ( computed, expected, epsilon )
20 if expected==0.0 then
21 shift = norm(computed-expected);
22 else
23 shift = norm(computed-expected)/norm(expected);
24 end
25 if shift < epsilon then
26 flag = 1;
27 else
28 flag = 0;
29 end
30 if flag <> 1 then pause,end
31endfunction
32//
33// assert_equal --
34// Returns 1 if the two real matrices computed and expected are equal.
35// Arguments
36// computed, expected : the two matrices to compare
37// epsilon : a small number
38//
39function flag = assert_equal ( computed , expected )
40 if computed==expected then
41 flag = 1;
42 else
43 flag = 0;
44 end
45 if flag <> 1 then pause,end
46endfunction
47
10// Maple code used to create reference 48// Maple code used to create reference
11// Digits := 40; 49// Digits := 40;
12// writeto("tand.ref"); interface(prettyprint = 0); 50// writeto("tand.ref"); interface(prettyprint = 0);
13// for i from 0 to 360 do if ((i<>90) and (i<>270) ) then print(-180+i, evalf[30](tan(-Pi+i*Pi/180), 30)) end end do; 51// for i from 0 to 360 do if ((i<>90) and (i<>270) ) then print(-180+i, evalf[30](tan(-Pi+i*Pi/180), 30)) end end do;
14// writeto(terminal); 52// writeto(terminal);
15ieee(2); 53ieee(2);
16pi=%pi;eps=%eps;Inf=%inf;NaN=%nan; //used to make following code runnable under Matlab 54//used to make following code runnable under Matlab
55pi=%pi;
56eps=%eps;
57Inf=%inf;
58NaN=%nan;
59
60//
61x = (-180:180)';
62// Remove 90 (index #91) and -90 (index #271),
63// where the value is %nan
64x([91 271]) = [];
17 65
18ref=[-180, 0. 66e=[
19-179, 0.174550649282175857651288952197e-1 670.
20-178, 0.349207694917477305004026257737e-1 680.174550649282175857651288952197e-1
21-177, 0.524077792830412040388058244741e-1 690.349207694917477305004026257737e-1
22-176, 0.699268119435104136669210603231e-1 700.524077792830412040388058244741e-1
23-175, 0.874886635259240052220186694350e-1 710.699268119435104136669210603231e-1
24-174, .105104235265676462511502380140 720.874886635259240052220186694350e-1
25-173, .122784560902904591134231136053 73.105104235265676462511502380140
26-172, .140540834702391446838117693433 74.122784560902904591134231136053
27-171, .158384440324536293838883092694 75.140540834702391446838117693433
28-170, .176326980708464973471090386869 76.158384440324536293838883092694
29-169, .194380309137718484243194224977 77.176326980708464973471090386869
30-168, .212556561670022125259591660570 78.194380309137718484243194224977
31-167, .230868191125563111748145613474 79.212556561670022125259591660570
32-166, .249328002843180691624039937805 80.230868191125563111748145613474
33-165, .267949192431122706472553658494 81.249328002843180691624039937805
34-164, .286745385758807940042758062732 82.267949192431122706472553658494
35-163, .305730681458660355734541958996 83.286745385758807940042758062732
36-162, .324919696232906326155871412215 84.305730681458660355734541958996
37-161, .344327613289665241957265839384 85.324919696232906326155871412215
38-160, .363970234266202361351047882776 86.344327613289665241957265839384
39-159, .383864035035415795971448408105 87.363970234266202361351047882776
40-158, .404026225835156811322348143579 88.383864035035415795971448408105
41-157, .424474816209604742023532062943 89.404026225835156811322348143579
42-156, .445228685308536163922367030644 90.424474816209604742023532062943
43-155, .466307658154998592830006194801 91.445228685308536163922367030644
44-154, .487732588565861422773111126616 92.466307658154998592830006194801
45-153, .509525449494428810513706911251 93.487732588565861422773111126616
46-152, .531709431661478748075915871842 94.509525449494428810513706911251
47-151, .554309051452768917820763092337 95.531709431661478748075915871842
48-150, .577350269189625764509148780503 96.554309051452768917820763092337
49-149, .600860619027560414878664426354 97.577350269189625764509148780503
50-148, .624869351909327509780510827950 98.600860619027560414878664426354
51-147, .649407593197510576982062911310 99.624869351909327509780510827950
52-146, .674508516842426632142460861996 100.649407593197510576982062911310
53-145, .700207538209709779458522719443 101.674508516842426632142460861996
54-144, .726542528005360885895466757481 102.700207538209709779458522719443
55-143, .753554050102794157073956448623 103.726542528005360885895466757481
56-142, .781285626506717397062949971961 104.753554050102794157073956448623
57-141, .809784033195007148036991374238 105.781285626506717397062949971961
58-140, .839099631177280011763127298122 106.809784033195007148036991374238
59-139, .869286737816226662200095638705 107.839099631177280011763127298122
60-138, .900404044297839945120477203883 108.869286737816226662200095638705
61-137, .932515086137661705612185627428 109.900404044297839945120477203883
62-136, .965688774807074045958027299699 110.932515086137661705612185627428
63-135, 1. 111.965688774807074045958027299699
64-134, 1.03553031379056950695883255125 1121.
65-133, 1.07236871002468253294602774807 1131.03553031379056950695883255125
66-132, 1.11061251482919287014348196417 1141.07236871002468253294602774807
67-131, 1.15036840722100955587633102557 1151.11061251482919287014348196417
68-130, 1.19175359259420995870530807186 1161.15036840722100955587633102557
69-129, 1.23489715653505139855617469537 1171.19175359259420995870530807186
70-128, 1.27994163219307878031102984757 1181.23489715653505139855617469537
71-127, 1.32704482162041003715947257408 1191.27994163219307878031102984757
72-126, 1.37638192047117353820720958191 1201.32704482162041003715947257408
73-125, 1.42814800674211450216061848500 1211.37638192047117353820720958191
74-124, 1.48256096851274025478715714915 1221.42814800674211450216061848500
75-123, 1.53986496381458290482679697261 1231.48256096851274025478715714915
76-122, 1.60033452904105035532673308117 1241.53986496381458290482679697261
77-121, 1.66427948235051791103049617004 1251.60033452904105035532673308117
78-120, 1.73205080756887729352744634151 1261.66427948235051791103049617004
79-119, 1.80404775527142393738178474825 1271.73205080756887729352744634151
80-118, 1.88072646534633201236083759582 1281.80404775527142393738178474825
81-117, 1.96261050550515058230464042622 1291.88072646534633201236083759582
82-116, 2.05030384157929621689901107053 1301.96261050550515058230464042622
83-115, 2.14450692050955861635626079106 1312.05030384157929621689901107053
84-114, 2.24603677390421605416332143840 1322.14450692050955861635626079106
85-113, 2.35585236582375283393958666236 1332.24603677390421605416332143840
86-112, 2.47508685341629582524001324606 1342.35585236582375283393958666236
87-111, 2.60508906469380153625841233646 1352.47508685341629582524001324606
88-110, 2.74747741945462227876166402648 1362.60508906469380153625841233646
89-109, 2.90421087767582280257932553456 1372.74747741945462227876166402648
90-108, 3.07768353717525340257029057602 1382.90421087767582280257932553456
91-107, 3.27085261848414086530885625734 1393.07768353717525340257029057602
92-106, 3.48741444384090865069622422508 1403.27085261848414086530885625734
93-105, 3.73205080756887729352744634156 1413.48741444384090865069622422508
94-104, 4.01078093353584471634571512944 1423.73205080756887729352744634156
95-103, 4.33147587428415554554616775463 1434.01078093353584471634571512944
96-102, 4.70463010947845423358623453738 1444.33147587428415554554616775463
97-101, 5.14455401597031013472322071724 1454.70463010947845423358623453738
98-100, 5.67128181961770953099441843983 1465.14455401597031013472322071724
99-99, 6.31375151467504309897946424494 1475.67128181961770953099441843983
100-98, 7.11536972238420874823056614360 1486.31375151467504309897946424494
101-97, 8.14434642797459402382566139528 1497.11536972238420874823056614360
102-96, 9.51436445422258492968397145491 1508.14434642797459402382566139528
103-95, 11.4300523027613430672108555485 1519.51436445422258492968397145491
104-94, 14.3006662567119279101280533475 15211.4300523027613430672108555485
105-93, 19.0811366877282110634067487325 15314.3006662567119279101280533475
106-92, 28.6362532829156035507565093210 15419.0811366877282110634067487325
107-91, 57.2899616307594246872781475211 15528.6362532829156035507565093210
108-89, -57.2899616307594246872781475211 15657.2899616307594246872781475211
109-88, -28.6362532829156035507565093210 157-57.2899616307594246872781475211
110-87, -19.0811366877282110634067487325 158-28.6362532829156035507565093210
111-86, -14.3006662567119279101280533475 159-19.0811366877282110634067487325
112-85, -11.4300523027613430672108555485 160-14.3006662567119279101280533475
113-84, -9.51436445422258492968397145491 161-11.4300523027613430672108555485
114-83, -8.14434642797459402382566139528 162-9.51436445422258492968397145491
115-82, -7.11536972238420874823056614360 163-8.14434642797459402382566139528
116-81, -6.31375151467504309897946424494 164-7.11536972238420874823056614360
117-80, -5.67128181961770953099441843983 165-6.31375151467504309897946424494
118-79, -5.14455401597031013472322071724 166-5.67128181961770953099441843983
119-78, -4.70463010947845423358623453738 167-5.14455401597031013472322071724
120-77, -4.33147587428415554554616775463 168-4.70463010947845423358623453738
121-76, -4.01078093353584471634571512944 169-4.33147587428415554554616775463
122-75, -3.73205080756887729352744634156 170-4.01078093353584471634571512944
123-74, -3.48741444384090865069622422508 171-3.73205080756887729352744634156
124-73, -3.27085261848414086530885625734 172-3.48741444384090865069622422508
125-72, -3.07768353717525340257029057602 173-3.27085261848414086530885625734
126-71, -2.90421087767582280257932553456 174-3.07768353717525340257029057602
127-70, -2.74747741945462227876166402648 175-2.90421087767582280257932553456
128-69, -2.60508906469380153625841233646 176-2.74747741945462227876166402648
129-68, -2.47508685341629582524001324606 177-2.60508906469380153625841233646
130-67, -2.35585236582375283393958666236 178-2.47508685341629582524001324606
131-66, -2.24603677390421605416332143840 179-2.35585236582375283393958666236
132-65, -2.14450692050955861635626079106 180-2.24603677390421605416332143840
133-64, -2.05030384157929621689901107053 181-2.14450692050955861635626079106
134-63, -1.96261050550515058230464042622 182-2.05030384157929621689901107053
135-62, -1.88072646534633201236083759582 183-1.96261050550515058230464042622
136-61, -1.80404775527142393738178474825 184-1.88072646534633201236083759582
137-60, -1.73205080756887729352744634151 185-1.80404775527142393738178474825
138-59, -1.66427948235051791103049617004 186-1.73205080756887729352744634151
139-58, -1.60033452904105035532673308117 187-1.66427948235051791103049617004
140-57, -1.53986496381458290482679697261 188-1.60033452904105035532673308117
141-56, -1.48256096851274025478715714915 189-1.53986496381458290482679697261
142-55, -1.42814800674211450216061848500 190-1.48256096851274025478715714915
143-54, -1.37638192047117353820720958191 191-1.42814800674211450216061848500
144-53, -1.32704482162041003715947257408 192-1.37638192047117353820720958191
145-52, -1.27994163219307878031102984757 193-1.32704482162041003715947257408
146-51, -1.23489715653505139855617469537 194-1.27994163219307878031102984757
147-50, -1.19175359259420995870530807186 195-1.23489715653505139855617469537
148-49, -1.15036840722100955587633102557 196-1.19175359259420995870530807186
149-48, -1.11061251482919287014348196417 197-1.15036840722100955587633102557
150-47, -1.07236871002468253294602774807 198-1.11061251482919287014348196417
151-46, -1.03553031379056950695883255125 199-1.07236871002468253294602774807
152-45, -1. 200-1.03553031379056950695883255125
153-44, -.965688774807074045958027299699 201-1.
154-43, -.932515086137661705612185627428 202-.965688774807074045958027299699
155-42, -.900404044297839945120477203883 203-.932515086137661705612185627428
156-41, -.869286737816226662200095638705 204-.900404044297839945120477203883
157-40, -.839099631177280011763127298122 205-.869286737816226662200095638705
158-39, -.809784033195007148036991374238 206-.839099631177280011763127298122
159-38, -.781285626506717397062949971961 207-.809784033195007148036991374238
160-37, -.753554050102794157073956448623 208-.781285626506717397062949971961
161-36, -.726542528005360885895466757481 209-.753554050102794157073956448623
162-35, -.700207538209709779458522719443 210-.726542528005360885895466757481
163-34, -.674508516842426632142460861996 211-.700207538209709779458522719443
164-33, -.649407593197510576982062911310 212-.674508516842426632142460861996
165-32, -.624869351909327509780510827950 213-.649407593197510576982062911310
166-31, -.600860619027560414878664426354 214-.624869351909327509780510827950
167-30, -.577350269189625764509148780503 215-.600860619027560414878664426354
168-29, -.554309051452768917820763092337 216-.577350269189625764509148780503
169-28, -.531709431661478748075915871842 217-.554309051452768917820763092337
170-27, -.509525449494428810513706911251 218-.531709431661478748075915871842
171-26, -.487732588565861422773111126616 219-.509525449494428810513706911251
172-25, -.466307658154998592830006194801 220-.487732588565861422773111126616
173-24, -.445228685308536163922367030644 221-.466307658154998592830006194801
174-23, -.424474816209604742023532062943 222-.445228685308536163922367030644
175-22, -.404026225835156811322348143579 223-.424474816209604742023532062943
176-21, -.383864035035415795971448408105 224-.404026225835156811322348143579
177-20, -.363970234266202361351047882776 225-.383864035035415795971448408105
178-19, -.344327613289665241957265839384 226-.363970234266202361351047882776
179-18, -.324919696232906326155871412215 227-.344327613289665241957265839384
180-17, -.305730681458660355734541958996 228-.324919696232906326155871412215
181-16, -.286745385758807940042758062732 229-.305730681458660355734541958996
182-15, -.267949192431122706472553658494 230-.286745385758807940042758062732
183-14, -.249328002843180691624039937805 231-.267949192431122706472553658494
184-13, -.230868191125563111748145613474 232-.249328002843180691624039937805
185-12, -.212556561670022125259591660570 233-.230868191125563111748145613474
186-11, -.194380309137718484243194224977 234-.212556561670022125259591660570
187-10, -.176326980708464973471090386869 235-.194380309137718484243194224977
188-9, -.158384440324536293838883092694 236-.176326980708464973471090386869
189-8, -.140540834702391446838117693433 237-.158384440324536293838883092694
190-7, -.122784560902904591134231136053 238-.140540834702391446838117693433
191-6, -.105104235265676462511502380140 239-.122784560902904591134231136053
192-5, -0.874886635259240052220186694350e-1 240-.105104235265676462511502380140
193-4, -0.699268119435104136669210603231e-1 241-0.874886635259240052220186694350e-1
194-3, -0.524077792830412040388058244741e-1 242-0.699268119435104136669210603231e-1
195-2, -0.349207694917477305004026257737e-1 243-0.524077792830412040388058244741e-1
196-1, -0.174550649282175857651288952197e-1 244-0.349207694917477305004026257737e-1
1970, 0. 245-0.174550649282175857651288952197e-1
1981, 0.174550649282175857651288952197e-1 2460.
1992, 0.349207694917477305004026257737e-1 2470.174550649282175857651288952197e-1
2003, 0.524077792830412040388058244741e-1 2480.349207694917477305004026257737e-1
2014, 0.699268119435104136669210603231e-1 2490.524077792830412040388058244741e-1
2025, 0.874886635259240052220186694350e-1 2500.699268119435104136669210603231e-1
2036, .105104235265676462511502380140 2510.874886635259240052220186694350e-1
2047, .122784560902904591134231136053 252.105104235265676462511502380140
2058, .140540834702391446838117693433 253.122784560902904591134231136053
2069, .158384440324536293838883092694 254.140540834702391446838117693433
20710, .176326980708464973471090386869 255.158384440324536293838883092694
20811, .194380309137718484243194224977 256.176326980708464973471090386869
20912, .212556561670022125259591660570 257.194380309137718484243194224977
21013, .230868191125563111748145613474 258.212556561670022125259591660570
21114, .249328002843180691624039937805 259.230868191125563111748145613474
21215, .267949192431122706472553658494 260.249328002843180691624039937805
21316, .286745385758807940042758062732 261.267949192431122706472553658494
21417, .305730681458660355734541958996 262.286745385758807940042758062732
21518, .324919696232906326155871412215 263.305730681458660355734541958996
21619, .344327613289665241957265839384 264.324919696232906326155871412215
21720, .363970234266202361351047882776 265.344327613289665241957265839384
21821, .383864035035415795971448408105 266.363970234266202361351047882776
21922, .404026225835156811322348143579 267.383864035035415795971448408105
22023, .424474816209604742023532062943 268.404026225835156811322348143579
22124, .445228685308536163922367030644 269.424474816209604742023532062943
22225, .466307658154998592830006194801 270.445228685308536163922367030644
22326, .487732588565861422773111126616 271.466307658154998592830006194801
22427, .509525449494428810513706911251 272.487732588565861422773111126616
22528, .531709431661478748075915871842 273.509525449494428810513706911251
22629, .554309051452768917820763092337 274.531709431661478748075915871842
22730, .577350269189625764509148780503 275.554309051452768917820763092337
22831, .600860619027560414878664426354 276.577350269189625764509148780503
22932, .624869351909327509780510827950 277.600860619027560414878664426354
23033, .649407593197510576982062911310 278.624869351909327509780510827950
23134, .674508516842426632142460861996 279.649407593197510576982062911310
23235, .700207538209709779458522719443 280.674508516842426632142460861996
23336, .726542528005360885895466757481 281.700207538209709779458522719443
23437, .753554050102794157073956448623 282.726542528005360885895466757481
23538, .781285626506717397062949971961 283.753554050102794157073956448623
23639, .809784033195007148036991374238 284.781285626506717397062949971961
23740, .839099631177280011763127298122 285.809784033195007148036991374238
23841, .869286737816226662200095638705 286.839099631177280011763127298122
23942, .900404044297839945120477203883 287.869286737816226662200095638705
24043, .932515086137661705612185627428 288.900404044297839945120477203883
24144, .965688774807074045958027299699 289.932515086137661705612185627428
24245, 1. 290.965688774807074045958027299699
24346, 1.03553031379056950695883255125 2911.
24447, 1.07236871002468253294602774807 2921.03553031379056950695883255125
24548, 1.11061251482919287014348196417 2931.07236871002468253294602774807
24649, 1.15036840722100955587633102557 2941.11061251482919287014348196417
24750, 1.19175359259420995870530807186 2951.15036840722100955587633102557
24851, 1.23489715653505139855617469537 2961.19175359259420995870530807186
24952, 1.27994163219307878031102984757 2971.23489715653505139855617469537
25053, 1.32704482162041003715947257408 2981.27994163219307878031102984757
25154, 1.37638192047117353820720958191 2991.32704482162041003715947257408
25255, 1.42814800674211450216061848500 3001.37638192047117353820720958191
25356, 1.48256096851274025478715714915 3011.42814800674211450216061848500
25457, 1.53986496381458290482679697261 3021.48256096851274025478715714915
25558, 1.60033452904105035532673308117 3031.53986496381458290482679697261
25659, 1.66427948235051791103049617004 3041.60033452904105035532673308117
25760, 1.73205080756887729352744634151 3051.66427948235051791103049617004
25861, 1.80404775527142393738178474825 3061.73205080756887729352744634151
25962, 1.88072646534633201236083759582 3071.80404775527142393738178474825
26063, 1.96261050550515058230464042622 3081.88072646534633201236083759582
26164, 2.05030384157929621689901107053 3091.96261050550515058230464042622
26265, 2.14450692050955861635626079106 3102.05030384157929621689901107053
26366, 2.24603677390421605416332143840 3112.14450692050955861635626079106
26467, 2.35585236582375283393958666236 3122.24603677390421605416332143840
26568, 2.47508685341629582524001324606 3132.35585236582375283393958666236
26669, 2.60508906469380153625841233646 3142.47508685341629582524001324606
26770, 2.74747741945462227876166402648 3152.60508906469380153625841233646
26871, 2.90421087767582280257932553456 3162.74747741945462227876166402648
26972, 3.07768353717525340257029057602 3172.90421087767582280257932553456
27073, 3.27085261848414086530885625734 3183.07768353717525340257029057602
27174, 3.48741444384090865069622422508 3193.27085261848414086530885625734
27275, 3.73205080756887729352744634156 3203.48741444384090865069622422508
27376, 4.01078093353584471634571512944 3213.73205080756887729352744634156
27477, 4.33147587428415554554616775463 3224.01078093353584471634571512944
27578, 4.70463010947845423358623453738 3234.33147587428415554554616775463
27679, 5.14455401597031013472322071724 3244.70463010947845423358623453738
27780, 5.67128181961770953099441843983 3255.14455401597031013472322071724
27881, 6.31375151467504309897946424494 3265.67128181961770953099441843983
27982, 7.11536972238420874823056614360 3276.31375151467504309897946424494
28083, 8.14434642797459402382566139528 3287.11536972238420874823056614360
28184, 9.51436445422258492968397145491 3298.14434642797459402382566139528
28285, 11.4300523027613430672108555485 3309.51436445422258492968397145491
28386, 14.3006662567119279101280533475 33111.4300523027613430672108555485
28487, 19.0811366877282110634067487325 33214.3006662567119279101280533475
28588, 28.6362532829156035507565093210 33319.0811366877282110634067487325
28689, 57.2899616307594246872781475211 33428.6362532829156035507565093210
28791, -57.2899616307594246872781475211 33557.2899616307594246872781475211
28892, -28.6362532829156035507565093210 336-57.2899616307594246872781475211
28993, -19.0811366877282110634067487325 337-28.6362532829156035507565093210
29094, -14.3006662567119279101280533475 338-19.0811366877282110634067487325
29195, -11.4300523027613430672108555485 339-14.3006662567119279101280533475
29296, -9.51436445422258492968397145491 340-11.4300523027613430672108555485
29397, -8.14434642797459402382566139528 341-9.51436445422258492968397145491
29498, -7.11536972238420874823056614360 342-8.14434642797459402382566139528
29599, -6.31375151467504309897946424494 343-7.11536972238420874823056614360
296100, -5.67128181961770953099441843983 344-6.31375151467504309897946424494
297101, -5.14455401597031013472322071724 345-5.67128181961770953099441843983
298102, -4.70463010947845423358623453738 346-5.14455401597031013472322071724
299103, -4.33147587428415554554616775463 347-4.70463010947845423358623453738
300104, -4.01078093353584471634571512944 348-4.33147587428415554554616775463
301105, -3.73205080756887729352744634156 349-4.01078093353584471634571512944
302106, -3.48741444384090865069622422508 350-3.73205080756887729352744634156
303107, -3.27085261848414086530885625734 351-3.48741444384090865069622422508
304108, -3.07768353717525340257029057602 352-3.27085261848414086530885625734
305109, -2.90421087767582280257932553456 353-3.07768353717525340257029057602
306110, -2.74747741945462227876166402648 354-2.90421087767582280257932553456
307111, -2.60508906469380153625841233646 355-2.74747741945462227876166402648
308112, -2.47508685341629582524001324606 356-2.60508906469380153625841233646
309113, -2.35585236582375283393958666236 357-2.47508685341629582524001324606
310114, -2.24603677390421605416332143840 358-2.35585236582375283393958666236
311115, -2.14450692050955861635626079106 359-2.24603677390421605416332143840
312116, -2.05030384157929621689901107053 360-2.14450692050955861635626079106
313117, -1.96261050550515058230464042622 361-2.05030384157929621689901107053
314118, -1.88072646534633201236083759582 362-1.96261050550515058230464042622
315119, -1.80404775527142393738178474825 363-1.88072646534633201236083759582
316120, -1.73205080756887729352744634151 364-1.80404775527142393738178474825
317121, -1.66427948235051791103049617004 365-1.73205080756887729352744634151
318122, -1.60033452904105035532673308117 366-1.66427948235051791103049617004
319123, -1.53986496381458290482679697261 367-1.60033452904105035532673308117
320124, -1.48256096851274025478715714915 368-1.53986496381458290482679697261
321125, -1.42814800674211450216061848500 369-1.48256096851274025478715714915
322126, -1.37638192047117353820720958191 370-1.42814800674211450216061848500
323127, -1.32704482162041003715947257408 371-1.37638192047117353820720958191
324128, -1.27994163219307878031102984757 372-1.32704482162041003715947257408
325129, -1.23489715653505139855617469537 373-1.27994163219307878031102984757
326130, -1.19175359259420995870530807186 374-1.23489715653505139855617469537
327131, -1.15036840722100955587633102557 375-1.19175359259420995870530807186
328132, -1.11061251482919287014348196417 376-1.15036840722100955587633102557
329133, -1.07236871002468253294602774807 377-1.11061251482919287014348196417
330134, -1.03553031379056950695883255125 378-1.07236871002468253294602774807
331135, -1. 379-1.03553031379056950695883255125
332136, -.965688774807074045958027299699 380-1.
333137, -.932515086137661705612185627428 381-.965688774807074045958027299699
334138, -.900404044297839945120477203883 382-.932515086137661705612185627428
335139, -.869286737816226662200095638705 383-.900404044297839945120477203883
336140, -.839099631177280011763127298122 384-.869286737816226662200095638705
337141, -.809784033195007148036991374238 385-.839099631177280011763127298122
338142, -.781285626506717397062949971961 386-.809784033195007148036991374238
339143, -.753554050102794157073956448623 387-.781285626506717397062949971961
340144, -.726542528005360885895466757481 388-.753554050102794157073956448623
341145, -.700207538209709779458522719443 389-.726542528005360885895466757481
342146, -.674508516842426632142460861996 390-.700207538209709779458522719443
343147, -.649407593197510576982062911310 391-.674508516842426632142460861996
344148, -.624869351909327509780510827950 392-.649407593197510576982062911310
345149, -.600860619027560414878664426354 393-.624869351909327509780510827950
346150, -.577350269189625764509148780503 394-.600860619027560414878664426354
347151, -.554309051452768917820763092337 395-.577350269189625764509148780503
348152, -.531709431661478748075915871842 396-.554309051452768917820763092337
349153, -.509525449494428810513706911251 397-.531709431661478748075915871842
350154, -.487732588565861422773111126616 398-.509525449494428810513706911251
351155, -.466307658154998592830006194801 399-.487732588565861422773111126616
352156, -.445228685308536163922367030644 400-.466307658154998592830006194801
353157, -.424474816209604742023532062943 401-.445228685308536163922367030644
354158, -.404026225835156811322348143579 402-.424474816209604742023532062943
355159, -.383864035035415795971448408105 403-.404026225835156811322348143579
356160, -.363970234266202361351047882776 404-.383864035035415795971448408105
357161, -.344327613289665241957265839384 405-.363970234266202361351047882776
358162, -.324919696232906326155871412215 406-.344327613289665241957265839384
359163, -.305730681458660355734541958996 407-.324919696232906326155871412215
360164, -.286745385758807940042758062732 408-.305730681458660355734541958996
361165, -.267949192431122706472553658494 409-.286745385758807940042758062732
362166, -.249328002843180691624039937805 410-.267949192431122706472553658494
363167, -.230868191125563111748145613474 411-.249328002843180691624039937805
364168, -.212556561670022125259591660570 412-.230868191125563111748145613474
365169, -.194380309137718484243194224977 413-.212556561670022125259591660570
366170, -.176326980708464973471090386869 414-.194380309137718484243194224977
367171, -.158384440324536293838883092694 415-.176326980708464973471090386869
368172, -.140540834702391446838117693433 416-.158384440324536293838883092694
369173, -.122784560902904591134231136053 417-.140540834702391446838117693433
370174, -.105104235265676462511502380140 418-.122784560902904591134231136053
371175, -0.874886635259240052220186694350e-1 419-.105104235265676462511502380140
372176, -0.699268119435104136669210603231e-1 420-0.874886635259240052220186694350e-1
373177, -0.524077792830412040388058244741e-1 421-0.699268119435104136669210603231e-1
374178, -0.349207694917477305004026257737e-1 422-0.524077792830412040388058244741e-1
375179, -0.174550649282175857651288952197e-1 423-0.349207694917477305004026257737e-1
376180, 0. 424-0.174550649282175857651288952197e-1
4250.
377]; 426];
427c = tand(x);
428assert_close ( c , e , 40 * %eps );
429
430// Turn a lot around the circle
431x1 = x + 2^6*360;
432c = tand(x1);
433assert_close ( c , e , 40 * %eps );
434// Turn a lot around the circle, the other side
435x2 = x - 2^6*360;
436c = tand(x2);
437assert_close ( c , e , 40 * %eps );
438
439assert_equal ( tand(0) , 0 );
440assert_equal ( tand(360) , 0 );
441assert_equal ( tand(-360) , 0 );
442
443assert_equal ( tand(180) , 0 );
444assert_equal ( tand(-180) , 0 );
445
446assert_close ( tand(30) , 1/sqrt(3) , %eps );
447assert_close ( tand(45) , 1 , 2 * %eps );
448assert_close ( tand(60) , sqrt(3) , 2*%eps );
449
450assert_equal ( isnan(tand(90)) , %t );
451assert_equal ( isnan(tand(-90)) , %t );
452assert_equal ( isnan(tand(270)) , %t );
453assert_equal ( isnan(tand(-270)) , %t );
378 454
379x=ref(:,1);e=max(abs((ref(:,2)-tand(x)))); 455assert_equal ( isnan(tand(-%inf)) , %t );
380if e>40*eps then pause,end 456assert_equal ( isnan(tand(%inf)) , %t );
381x=ref(:,1)+2^6*360; e=max(abs((ref(:,2)-tand(x)))); 457assert_equal ( isnan(tand(%nan)) , %t );
382if e>40*eps then pause,end
383 458
384x=ref(:,1)+2^10*360; e=max(abs((ref(:,2)-tand(x)))); 459assert_equal ( tand([]) , [] );
385if e>40*eps then pause,end
386 460
387if tand(0)<>0 then pause,end 461ieee(0)
388if tand(360)<>0 then pause,end 462assert_equal ( tand(0) , 0 );
389if tand(-360)<>0 then pause,end 463assert_close ( tand(30) , 1/sqrt(3) , %eps );
390if tand(90)<>%inf then pause,end 464assert_close ( tand(45) , 1 , 2 * %eps );
391if tand(-90)<>-%inf then pause,end 465assert_close ( tand(60) , sqrt(3) , 2*%eps );
392if tand(180)<>0 then pause,end
393if tand(-180)<>0 then pause,end
394if tand(270)<>%inf then pause,end
395if tand(-270)<>-%inf then pause,end
396if or(abs(tand([30 45 60])-[1/sqrt(3) 1 sqrt(3) ])>2*%eps) then pause,end
397 466
398if ~isnan(tand(-Inf)) then pause,end
399if ~isnan(tand(Inf)) then pause,end
400if ~isnan(tand(NaN)) then pause,end
401 467
402if tand([])<>[] then pause,end
diff --git a/scilab/modules/fftw/Makefile.in b/scilab/modules/fftw/Makefile.in
index 8a10f5b..232bda6 100644
--- a/scilab/modules/fftw/Makefile.in
+++ b/scilab/modules/fftw/Makefile.in
@@ -261,6 +261,7 @@ LD = @LD@
261LDFLAGS = @LDFLAGS@ 261LDFLAGS = @LDFLAGS@
262LIBICONV = @LIBICONV@ 262LIBICONV = @LIBICONV@
263LIBINTL = @LIBINTL@ 263LIBINTL = @LIBINTL@
264LIBM = @LIBM@
264LIBOBJS = @LIBOBJS@ 265LIBOBJS = @LIBOBJS@
265LIBS = @LIBS@ 266LIBS = @LIBS@
266LIBTOOL = @LIBTOOL@ 267LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/fileio/Makefile.in b/scilab/modules/fileio/Makefile.in
index 350fb23..22ccc9f 100644
--- a/scilab/modules/fileio/Makefile.in
+++ b/scilab/modules/fileio/Makefile.in
@@ -291,6 +291,7 @@ LD = @LD@
291LDFLAGS = @LDFLAGS@ 291LDFLAGS = @LDFLAGS@
292LIBICONV = @LIBICONV@ 292LIBICONV = @LIBICONV@
293LIBINTL = @LIBINTL@ 293LIBINTL = @LIBINTL@
294LIBM = @LIBM@
294LIBOBJS = @LIBOBJS@ 295LIBOBJS = @LIBOBJS@
295LIBS = @LIBS@ 296LIBS = @LIBS@
296LIBTOOL = @LIBTOOL@ 297LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/functions/Makefile.in b/scilab/modules/functions/Makefile.in
index 7291e50..c2f90e6 100644
--- a/scilab/modules/functions/Makefile.in
+++ b/scilab/modules/functions/Makefile.in
@@ -253,6 +253,7 @@ LD = @LD@
253LDFLAGS = @LDFLAGS@ 253LDFLAGS = @LDFLAGS@
254LIBICONV = @LIBICONV@ 254LIBICONV = @LIBICONV@
255LIBINTL = @LIBINTL@ 255LIBINTL = @LIBINTL@
256LIBM = @LIBM@
256LIBOBJS = @LIBOBJS@ 257LIBOBJS = @LIBOBJS@
257LIBS = @LIBS@ 258LIBS = @LIBS@
258LIBTOOL = @LIBTOOL@ 259LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/genetic_algorithms/Makefile.in b/scilab/modules/genetic_algorithms/Makefile.in
index b260fb2..df93152 100644
--- a/scilab/modules/genetic_algorithms/Makefile.in
+++ b/scilab/modules/genetic_algorithms/Makefile.in
@@ -204,6 +204,7 @@ LD = @LD@
204LDFLAGS = @LDFLAGS@ 204LDFLAGS = @LDFLAGS@
205LIBICONV = @LIBICONV@ 205LIBICONV = @LIBICONV@
206LIBINTL = @LIBINTL@ 206LIBINTL = @LIBINTL@
207LIBM = @LIBM@
207LIBOBJS = @LIBOBJS@ 208LIBOBJS = @LIBOBJS@
208LIBS = @LIBS@ 209LIBS = @LIBS@
209LIBTOOL = @LIBTOOL@ 210LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/graphic_export/Makefile.in b/scilab/modules/graphic_export/Makefile.in
index f34ed68..14798e2 100644
--- a/scilab/modules/graphic_export/Makefile.in
+++ b/scilab/modules/graphic_export/Makefile.in
@@ -278,6 +278,7 @@ LD = @LD@
278LDFLAGS = @LDFLAGS@ 278LDFLAGS = @LDFLAGS@
279LIBICONV = @LIBICONV@ 279LIBICONV = @LIBICONV@
280LIBINTL = @LIBINTL@ 280LIBINTL = @LIBINTL@
281LIBM = @LIBM@
281LIBOBJS = @LIBOBJS@ 282LIBOBJS = @LIBOBJS@
282LIBS = @LIBS@ 283LIBS = @LIBS@
283LIBTOOL = @LIBTOOL@ 284LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/graphics/Makefile.in b/scilab/modules/graphics/Makefile.in
index 2474334..ca2e8ec 100644
--- a/scilab/modules/graphics/Makefile.in
+++ b/scilab/modules/graphics/Makefile.in
@@ -613,6 +613,7 @@ LD = @LD@
613LDFLAGS = @LDFLAGS@ 613LDFLAGS = @LDFLAGS@
614LIBICONV = @LIBICONV@ 614LIBICONV = @LIBICONV@
615LIBINTL = @LIBINTL@ 615LIBINTL = @LIBINTL@
616LIBM = @LIBM@
616LIBOBJS = @LIBOBJS@ 617LIBOBJS = @LIBOBJS@
617LIBS = @LIBS@ 618LIBS = @LIBS@
618LIBTOOL = @LIBTOOL@ 619LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/gui/Makefile.in b/scilab/modules/gui/Makefile.in
index ab72ed9..841338b 100644
--- a/scilab/modules/gui/Makefile.in
+++ b/scilab/modules/gui/Makefile.in
@@ -366,6 +366,7 @@ LD = @LD@
366LDFLAGS = @LDFLAGS@ 366LDFLAGS = @LDFLAGS@
367LIBICONV = @LIBICONV@ 367LIBICONV = @LIBICONV@
368LIBINTL = @LIBINTL@ 368LIBINTL = @LIBINTL@
369LIBM = @LIBM@
369LIBOBJS = @LIBOBJS@ 370LIBOBJS = @LIBOBJS@
370LIBS = @LIBS@ 371LIBS = @LIBS@
371LIBTOOL = @LIBTOOL@ 372LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/hdf5/Makefile.in b/scilab/modules/hdf5/Makefile.in
index babbf34..6e4cfc0 100644
--- a/scilab/modules/hdf5/Makefile.in
+++ b/scilab/modules/hdf5/Makefile.in
@@ -292,6 +292,7 @@ LD = @LD@
292LDFLAGS = @LDFLAGS@ 292LDFLAGS = @LDFLAGS@
293LIBICONV = @LIBICONV@ 293LIBICONV = @LIBICONV@
294LIBINTL = @LIBINTL@ 294LIBINTL = @LIBINTL@
295LIBM = @LIBM@
295LIBOBJS = @LIBOBJS@ 296LIBOBJS = @LIBOBJS@
296LIBS = @LIBS@ 297LIBS = @LIBS@
297LIBTOOL = @LIBTOOL@ 298LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/helptools/Makefile.in b/scilab/modules/helptools/Makefile.in
index dfda34d..2e80b76 100644
--- a/scilab/modules/helptools/Makefile.in
+++ b/scilab/modules/helptools/Makefile.in
@@ -266,6 +266,7 @@ LD = @LD@
266LDFLAGS = @LDFLAGS@ 266LDFLAGS = @LDFLAGS@
267LIBICONV = @LIBICONV@ 267LIBICONV = @LIBICONV@
268LIBINTL = @LIBINTL@ 268LIBINTL = @LIBINTL@
269LIBM = @LIBM@
269LIBOBJS = @LIBOBJS@ 270LIBOBJS = @LIBOBJS@
270LIBS = @LIBS@ 271LIBS = @LIBS@
271LIBTOOL = @LIBTOOL@ 272LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/history_manager/Makefile.in b/scilab/modules/history_manager/Makefile.in
index 97856f4..b581876 100644
--- a/scilab/modules/history_manager/Makefile.in
+++ b/scilab/modules/history_manager/Makefile.in
@@ -289,6 +289,7 @@ LD = @LD@
289LDFLAGS = @LDFLAGS@ 289LDFLAGS = @LDFLAGS@
290LIBICONV = @LIBICONV@ 290LIBICONV = @LIBICONV@
291LIBINTL = @LIBINTL@ 291LIBINTL = @LIBINTL@
292LIBM = @LIBM@
292LIBOBJS = @LIBOBJS@ 293LIBOBJS = @LIBOBJS@
293LIBS = @LIBS@ 294LIBS = @LIBS@
294LIBTOOL = @LIBTOOL@ 295LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/integer/Makefile.in b/scilab/modules/integer/Makefile.in
index 21e59bd..d05cb05 100644
--- a/scilab/modules/integer/Makefile.in
+++ b/scilab/modules/integer/Makefile.in
@@ -277,6 +277,7 @@ LD = @LD@
277LDFLAGS = @LDFLAGS@ 277LDFLAGS = @LDFLAGS@
278LIBICONV = @LIBICONV@ 278LIBICONV = @LIBICONV@
279LIBINTL = @LIBINTL@ 279LIBINTL = @LIBINTL@
280LIBM = @LIBM@
280LIBOBJS = @LIBOBJS@ 281LIBOBJS = @LIBOBJS@
281LIBS = @LIBS@ 282LIBS = @LIBS@
282LIBTOOL = @LIBTOOL@ 283LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/interpolation/Makefile.in b/scilab/modules/interpolation/Makefile.in
index b2113fb..4f8aadf 100644
--- a/scilab/modules/interpolation/Makefile.in
+++ b/scilab/modules/interpolation/Makefile.in
@@ -259,6 +259,7 @@ LD = @LD@
259LDFLAGS = @LDFLAGS@ 259LDFLAGS = @LDFLAGS@
260LIBICONV = @LIBICONV@ 260LIBICONV = @LIBICONV@
261LIBINTL = @LIBINTL@ 261LIBINTL = @LIBINTL@
262LIBM = @LIBM@
262LIBOBJS = @LIBOBJS@ 263LIBOBJS = @LIBOBJS@
263LIBS = @LIBS@ 264LIBS = @LIBS@
264LIBTOOL = @LIBTOOL@ 265LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/intersci/Makefile.in b/scilab/modules/intersci/Makefile.in
index ea1fa8e..809ca1e 100644
--- a/scilab/modules/intersci/Makefile.in
+++ b/scilab/modules/intersci/Makefile.in
@@ -242,6 +242,7 @@ LD = @LD@
242LDFLAGS = @LDFLAGS@ 242LDFLAGS = @LDFLAGS@
243LIBICONV = @LIBICONV@ 243LIBICONV = @LIBICONV@
244LIBINTL = @LIBINTL@ 244LIBINTL = @LIBINTL@
245LIBM = @LIBM@
245LIBOBJS = @LIBOBJS@ 246LIBOBJS = @LIBOBJS@
246LIBS = @LIBS@ 247LIBS = @LIBS@
247LIBTOOL = @LIBTOOL@ 248LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/io/Makefile.in b/scilab/modules/io/Makefile.in
index 7ce3e6a..67e72be 100644
--- a/scilab/modules/io/Makefile.in
+++ b/scilab/modules/io/Makefile.in
@@ -263,6 +263,7 @@ LD = @LD@
263LDFLAGS = @LDFLAGS@ 263LDFLAGS = @LDFLAGS@
264LIBICONV = @LIBICONV@ 264LIBICONV = @LIBICONV@
265LIBINTL = @LIBINTL@ 265LIBINTL = @LIBINTL@
266LIBM = @LIBM@
266LIBOBJS = @LIBOBJS@ 267LIBOBJS = @LIBOBJS@
267LIBS = @LIBS@ 268LIBS = @LIBS@
268LIBTOOL = @LIBTOOL@ 269LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/javasci/Makefile.in b/scilab/modules/javasci/Makefile.in
index 1e568b3..b6359f8 100644
--- a/scilab/modules/javasci/Makefile.in
+++ b/scilab/modules/javasci/Makefile.in
@@ -254,6 +254,7 @@ LD = @LD@
254LDFLAGS = @LDFLAGS@ 254LDFLAGS = @LDFLAGS@
255LIBICONV = @LIBICONV@ 255LIBICONV = @LIBICONV@
256LIBINTL = @LIBINTL@ 256LIBINTL = @LIBINTL@
257LIBM = @LIBM@
257LIBOBJS = @LIBOBJS@ 258LIBOBJS = @LIBOBJS@
258LIBS = @LIBS@ 259LIBS = @LIBS@
259LIBTOOL = @LIBTOOL@ 260LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/jvm/Makefile.in b/scilab/modules/jvm/Makefile.in
index 189f09b..886ff9a 100644
--- a/scilab/modules/jvm/Makefile.in
+++ b/scilab/modules/jvm/Makefile.in
@@ -269,6 +269,7 @@ LD = @LD@
269LDFLAGS = @LDFLAGS@ 269LDFLAGS = @LDFLAGS@
270LIBICONV = @LIBICONV@ 270LIBICONV = @LIBICONV@
271LIBINTL = @LIBINTL@ 271LIBINTL = @LIBINTL@
272LIBM = @LIBM@
272LIBOBJS = @LIBOBJS@ 273LIBOBJS = @LIBOBJS@
273LIBS = @LIBS@ 274LIBS = @LIBS@
274LIBTOOL = @LIBTOOL@ 275LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/linear_algebra/Makefile.in b/scilab/modules/linear_algebra/Makefile.in
index 1bf9660..64c7af4 100644
--- a/scilab/modules/linear_algebra/Makefile.in
+++ b/scilab/modules/linear_algebra/Makefile.in
@@ -279,6 +279,7 @@ LD = @LD@
279LDFLAGS = @LDFLAGS@ 279LDFLAGS = @LDFLAGS@
280LIBICONV = @LIBICONV@ 280LIBICONV = @LIBICONV@
281LIBINTL = @LIBINTL@ 281LIBINTL = @LIBINTL@
282LIBM = @LIBM@
282LIBOBJS = @LIBOBJS@ 283LIBOBJS = @LIBOBJS@
283LIBS = @LIBS@ 284LIBS = @LIBS@
284LIBTOOL = @LIBTOOL@ 285LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/localization/Makefile.in b/scilab/modules/localization/Makefile.in
index a66ad16..0dbad79 100644
--- a/scilab/modules/localization/Makefile.in
+++ b/scilab/modules/localization/Makefile.in
@@ -266,6 +266,7 @@ LD = @LD@
266LDFLAGS = @LDFLAGS@ 266LDFLAGS = @LDFLAGS@
267LIBICONV = @LIBICONV@ 267LIBICONV = @LIBICONV@
268LIBINTL = @LIBINTL@ 268LIBINTL = @LIBINTL@
269LIBM = @LIBM@
269LIBOBJS = @LIBOBJS@ 270LIBOBJS = @LIBOBJS@
270LIBS = @LIBS@ 271LIBS = @LIBS@
271LIBTOOL = @LIBTOOL@ 272LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/m2sci/Makefile.in b/scilab/modules/m2sci/Makefile.in
index 01064c7..5bf30be 100644
--- a/scilab/modules/m2sci/Makefile.in
+++ b/scilab/modules/m2sci/Makefile.in
@@ -199,6 +199,7 @@ LD = @LD@
199LDFLAGS = @LDFLAGS@ 199LDFLAGS = @LDFLAGS@
200LIBICONV = @LIBICONV@ 200LIBICONV = @LIBICONV@
201LIBINTL = @LIBINTL@ 201LIBINTL = @LIBINTL@
202LIBM = @LIBM@
202LIBOBJS = @LIBOBJS@ 203LIBOBJS = @LIBOBJS@
203LIBS = @LIBS@ 204LIBS = @LIBS@
204LIBTOOL = @LIBTOOL@ 205LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/maple2scilab/Makefile.in b/scilab/modules/maple2scilab/Makefile.in
index 053b9dd..a1327e3 100644
--- a/scilab/modules/maple2scilab/Makefile.in
+++ b/scilab/modules/maple2scilab/Makefile.in
@@ -199,6 +199,7 @@ LD = @LD@
199LDFLAGS = @LDFLAGS@ 199LDFLAGS = @LDFLAGS@
200LIBICONV = @LIBICONV@ 200LIBICONV = @LIBICONV@
201LIBINTL = @LIBINTL@ 201LIBINTL = @LIBINTL@
202LIBM = @LIBM@
202LIBOBJS = @LIBOBJS@ 203LIBOBJS = @LIBOBJS@
203LIBS = @LIBS@ 204LIBS = @LIBS@
204LIBTOOL = @LIBTOOL@ 205LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/matio/Makefile.in b/scilab/modules/matio/Makefile.in
index 19d708c..90918d4 100644
--- a/scilab/modules/matio/Makefile.in
+++ b/scilab/modules/matio/Makefile.in
@@ -265,6 +265,7 @@ LD = @LD@
265LDFLAGS = @LDFLAGS@ 265LDFLAGS = @LDFLAGS@
266LIBICONV = @LIBICONV@ 266LIBICONV = @LIBICONV@
267LIBINTL = @LIBINTL@ 267LIBINTL = @LIBINTL@
268LIBM = @LIBM@
268LIBOBJS = @LIBOBJS@ 269LIBOBJS = @LIBOBJS@
269LIBS = @LIBS@ 270LIBS = @LIBS@
270LIBTOOL = @LIBTOOL@ 271LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/mexlib/Makefile.in b/scilab/modules/mexlib/Makefile.in
index 01a6ad2..9498984 100644
--- a/scilab/modules/mexlib/Makefile.in
+++ b/scilab/modules/mexlib/Makefile.in
@@ -243,6 +243,7 @@ LD = @LD@
243LDFLAGS = @LDFLAGS@ 243LDFLAGS = @LDFLAGS@
244LIBICONV = @LIBICONV@ 244LIBICONV = @LIBICONV@
245LIBINTL = @LIBINTL@ 245LIBINTL = @LIBINTL@
246LIBM = @LIBM@
246LIBOBJS = @LIBOBJS@ 247LIBOBJS = @LIBOBJS@
247LIBS = @LIBS@ 248LIBS = @LIBS@
248LIBTOOL = @LIBTOOL@ 249LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/optimization/Makefile.in b/scilab/modules/optimization/Makefile.in
index 5383c18..45d0672 100644
--- a/scilab/modules/optimization/Makefile.in
+++ b/scilab/modules/optimization/Makefile.in
@@ -270,6 +270,7 @@ LD = @LD@
270LDFLAGS = @LDFLAGS@ 270LDFLAGS = @LDFLAGS@
271LIBICONV = @LIBICONV@ 271LIBICONV = @LIBICONV@
272LIBINTL = @LIBINTL@ 272LIBINTL = @LIBINTL@
273LIBM = @LIBM@
273LIBOBJS = @LIBOBJS@ 274LIBOBJS = @LIBOBJS@
274LIBS = @LIBS@ 275LIBS = @LIBS@
275LIBTOOL = @LIBTOOL@ 276LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/output_stream/Makefile.in b/scilab/modules/output_stream/Makefile.in
index 87bdfc6..b985e6f 100644
--- a/scilab/modules/output_stream/Makefile.in
+++ b/scilab/modules/output_stream/Makefile.in
@@ -274,6 +274,7 @@ LD = @LD@
274LDFLAGS = @LDFLAGS@ 274LDFLAGS = @LDFLAGS@
275LIBICONV = @LIBICONV@ 275LIBICONV = @LIBICONV@
276LIBINTL = @LIBINTL@ 276LIBINTL = @LIBINTL@
277LIBM = @LIBM@
277LIBOBJS = @LIBOBJS@ 278LIBOBJS = @LIBOBJS@
278LIBS = @LIBS@ 279LIBS = @LIBS@
279LIBTOOL = @LIBTOOL@ 280LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/overloading/Makefile.in b/scilab/modules/overloading/Makefile.in
index 287d174..408fd54 100644
--- a/scilab/modules/overloading/Makefile.in
+++ b/scilab/modules/overloading/Makefile.in
@@ -200,6 +200,7 @@ LD = @LD@
200LDFLAGS = @LDFLAGS@ 200LDFLAGS = @LDFLAGS@
201LIBICONV = @LIBICONV@ 201LIBICONV = @LIBICONV@
202LIBINTL = @LIBINTL@ 202LIBINTL = @LIBINTL@
203LIBM = @LIBM@
203LIBOBJS = @LIBOBJS@ 204LIBOBJS = @LIBOBJS@
204LIBS = @LIBS@ 205LIBS = @LIBS@
205LIBTOOL = @LIBTOOL@ 206LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/parameters/Makefile.in b/scilab/modules/parameters/Makefile.in
index bb8ddf3..e22d624 100644
--- a/scilab/modules/parameters/Makefile.in
+++ b/scilab/modules/parameters/Makefile.in
@@ -203,6 +203,7 @@ LD = @LD@
203LDFLAGS = @LDFLAGS@ 203LDFLAGS = @LDFLAGS@
204LIBICONV = @LIBICONV@ 204LIBICONV = @LIBICONV@
205LIBINTL = @LIBINTL@ 205LIBINTL = @LIBINTL@
206LIBM = @LIBM@
206LIBOBJS = @LIBOBJS@ 207LIBOBJS = @LIBOBJS@
207LIBS = @LIBS@ 208LIBS = @LIBS@
208LIBTOOL = @LIBTOOL@ 209LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/polynomials/Makefile.in b/scilab/modules/polynomials/Makefile.in
index 29bfa28..7d803dd 100644
--- a/scilab/modules/polynomials/Makefile.in
+++ b/scilab/modules/polynomials/Makefile.in
@@ -273,6 +273,7 @@ LD = @LD@
273LDFLAGS = @LDFLAGS@ 273LDFLAGS = @LDFLAGS@
274LIBICONV = @LIBICONV@ 274LIBICONV = @LIBICONV@
275LIBINTL = @LIBINTL@ 275LIBINTL = @LIBINTL@
276LIBM = @LIBM@
276LIBOBJS = @LIBOBJS@ 277LIBOBJS = @LIBOBJS@
277LIBS = @LIBS@ 278LIBS = @LIBS@
278LIBTOOL = @LIBTOOL@ 279LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/pvm/Makefile.in b/scilab/modules/pvm/Makefile.in
index e4c2d21..37bc35a 100644
--- a/scilab/modules/pvm/Makefile.in
+++ b/scilab/modules/pvm/Makefile.in
@@ -314,6 +314,7 @@ LD = @LD@
314LDFLAGS = @LDFLAGS@ 314LDFLAGS = @LDFLAGS@
315LIBICONV = @LIBICONV@ 315LIBICONV = @LIBICONV@
316LIBINTL = @LIBINTL@ 316LIBINTL = @LIBINTL@
317LIBM = @LIBM@
317LIBOBJS = @LIBOBJS@ 318LIBOBJS = @LIBOBJS@
318LIBS = @LIBS@ 319LIBS = @LIBS@
319LIBTOOL = @LIBTOOL@ 320LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/randlib/Makefile.in b/scilab/modules/randlib/Makefile.in
index 3e998f7..e4a21ff 100644
--- a/scilab/modules/randlib/Makefile.in
+++ b/scilab/modules/randlib/Makefile.in
@@ -247,6 +247,7 @@ LD = @LD@
247LDFLAGS = @LDFLAGS@ 247LDFLAGS = @LDFLAGS@
248LIBICONV = @LIBICONV@ 248LIBICONV = @LIBICONV@
249LIBINTL = @LIBINTL@ 249LIBINTL = @LIBINTL@
250LIBM = @LIBM@
250LIBOBJS = @LIBOBJS@ 251LIBOBJS = @LIBOBJS@
251LIBS = @LIBS@ 252LIBS = @LIBS@
252LIBTOOL = @LIBTOOL@ 253LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/renderer/Makefile.in b/scilab/modules/renderer/Makefile.in
index ad0e44d..43afc2c 100644
--- a/scilab/modules/renderer/Makefile.in
+++ b/scilab/modules/renderer/Makefile.in
@@ -509,6 +509,7 @@ LD = @LD@
509LDFLAGS = @LDFLAGS@ 509LDFLAGS = @LDFLAGS@
510LIBICONV = @LIBICONV@ 510LIBICONV = @LIBICONV@
511LIBINTL = @LIBINTL@ 511LIBINTL = @LIBINTL@
512LIBM = @LIBM@
512LIBOBJS = @LIBOBJS@ 513LIBOBJS = @LIBOBJS@
513LIBS = @LIBS@ 514LIBS = @LIBS@
514LIBTOOL = @LIBTOOL@ 515LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/polylineDrawing/PolylineLineDrawerGL.java b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/polylineDrawing/PolylineLineDrawerGL.java
index 184011f..c1a52b2 100644
--- a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/polylineDrawing/PolylineLineDrawerGL.java
+++ b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/polylineDrawing/PolylineLineDrawerGL.java
@@ -64,17 +64,21 @@ public class PolylineLineDrawerGL extends LineDrawerGL implements PolylineDrawer
64 // We need to use GL_LINE_STRIP instead of GL_LINES 64 // We need to use GL_LINE_STRIP instead of GL_LINES
65 boolean previousValueIsNan = true; 65 boolean previousValueIsNan = true;
66 for (int i = 0; i < nbLines; i++) { 66 for (int i = 0; i < nbLines; i++) {
67 if (GeomAlgos.isVector3DFinite(xCoords[i], yCoords[i], zCoords[i])) { 67 if (GeomAlgos.isVector3DRepresentable(xCoords[i], yCoords[i], zCoords[i])) {
68 if (previousValueIsNan) { 68 if (previousValueIsNan) {
69 // new line sequence 69 // new line sequence
70 // check if there are at least two consecutive valid values. 70 // check if there are at least two consecutive valid values.
71 if (i < nbLines - 1 && GeomAlgos.isVector3DFinite(xCoords[i + 1], yCoords[i + 1], zCoords[i + 1])) { 71 if (i < nbLines - 1 && GeomAlgos.isVector3DRepresentable(xCoords[i + 1], yCoords[i + 1], zCoords[i + 1])) {
72 gl.glBegin(GL.GL_LINE_STRIP); 72 gl.glBegin(GL.GL_LINE_STRIP);
73 previousValueIsNan = false; 73 previousValueIsNan = false;
74 } 74 }
75 } 75 }
76 gl.glVertex3d(xCoords[i], yCoords[i], zCoords[i]); 76
77 77 gl.glVertex3f(
78 GeomAlgos.glRepresentable(xCoords[i]),
79 GeomAlgos.glRepresentable(yCoords[i]),
80 GeomAlgos.glRepresentable(zCoords[i]));
81
78 } else if (!previousValueIsNan) { 82 } else if (!previousValueIsNan) {
79 // stop recording 83 // stop recording
80 // end the last polyline 84 // end the last polyline
diff --git a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/geom3D/GeomAlgos.java b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/geom3D/GeomAlgos.java
index 6876416..4d97a0e 100644
--- a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/geom3D/GeomAlgos.java
+++ b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/geom3D/GeomAlgos.java
@@ -24,6 +24,9 @@ public final class GeomAlgos {
24 public static final int RECTANGLE_NB_CORNERS = 4; 24 public static final int RECTANGLE_NB_CORNERS = 4;
25 private static final int LAST_INDEX = 3; 25 private static final int LAST_INDEX = 3;
26 26
27 /** OpenGl maximum representable number (2^32) */
28 private static final float BIGGEST = 4294967296f;
29
27 /** 30 /**
28 * Default constructor 31 * Default constructor
29 */ 32 */
@@ -172,4 +175,38 @@ public final class GeomAlgos {
172 || Double.isInfinite(zCoord) || Double.isNaN(zCoord)); 175 || Double.isInfinite(zCoord) || Double.isNaN(zCoord));
173 } 176 }
174 177
178 /**
179 * Check if the 3 component of a 3D vector are not NaN.
180 * @param xCoord X coordinate of the vector
181 * @param yCoord Y coordinate of the vector
182 * @param zCoord Z coordinate of the vector
183 * @return true if the vector doesn't content any NaN value, false otherwise
184 */
185 public static boolean isVector3DRepresentable(double xCoord, double yCoord, double zCoord) {
186 return !(Double.isNaN(xCoord) || Double.isNaN(yCoord) || Double.isNaN(zCoord));
187 }
188
189 /**
190 * Transform a double value to a representable OpenGl value
191 * Because,
192 * The maximum representable magnitude of a floating-point number
193 * used to represent positional, normal, or texture coordinates must
194 * be at least 2^32
195 * in :
196 * http://www.opengl.org/registry/doc/glspec31.20090528.pdf
197 * Chapter 2.1.1 Floating-Point Computation
198 * @param value the value to represents
199 * @return the representable OpenGl value
200 */
201 public static float glRepresentable(double value) {
202 float f = (float) value;
203 if (Float.isInfinite(f)) {
204 if (f > 0) {
205 f = BIGGEST;
206 } else {
207 f = -BIGGEST;
208 }
209 }
210 return f;
211 }
175} 212}
diff --git a/scilab/modules/renderer/tests/nonreg_tests/bug_6558.tst b/scilab/modules/renderer/tests/nonreg_tests/bug_6558.tst
new file mode 100644
index 0000000..14b25a9
--- /dev/null
+++ b/scilab/modules/renderer/tests/nonreg_tests/bug_6558.tst
@@ -0,0 +1,26 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Pierre LANDO
4//
5//// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- TEST WITH GRAPHIC -->
9// <-- INTERACTIVE TEST -->
10//
11// <-- Non-regression test for bug 6558 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/show_bug.cgi?id=6558
15//
16// <-- Short Description -->
17// Infinite value was not plotted even if it was possible.
18
19
20// Run this script and see the vertical line @ x=0
21
22ieee(2);
23x=linspace(-1,1,501);
24y= exp(8*x) + 1 ./ abs(x);
25plot(x,y);
26
diff --git a/scilab/modules/scicos/Makefile.in b/scilab/modules/scicos/Makefile.in
index 0ea167c..14071c9 100644
--- a/scilab/modules/scicos/Makefile.in
+++ b/scilab/modules/scicos/Makefile.in
@@ -404,6 +404,7 @@ LD = @LD@
404LDFLAGS = @LDFLAGS@ 404LDFLAGS = @LDFLAGS@
405LIBICONV = @LIBICONV@ 405LIBICONV = @LIBICONV@
406LIBINTL = @LIBINTL@ 406LIBINTL = @LIBINTL@
407LIBM = @LIBM@
407LIBOBJS = @LIBOBJS@ 408LIBOBJS = @LIBOBJS@
408LIBS = @LIBS@ 409LIBS = @LIBS@
409LIBTOOL = @LIBTOOL@ 410LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/scicos_blocks/Makefile.in b/scilab/modules/scicos_blocks/Makefile.in
index e7e8b20..9212fd7 100644
--- a/scilab/modules/scicos_blocks/Makefile.in
+++ b/scilab/modules/scicos_blocks/Makefile.in
@@ -720,6 +720,7 @@ LD = @LD@
720LDFLAGS = @LDFLAGS@ 720LDFLAGS = @LDFLAGS@
721LIBICONV = @LIBICONV@ 721LIBICONV = @LIBICONV@
722LIBINTL = @LIBINTL@ 722LIBINTL = @LIBINTL@
723LIBM = @LIBM@
723LIBOBJS = @LIBOBJS@ 724LIBOBJS = @LIBOBJS@
724LIBS = @LIBS@ 725LIBS = @LIBS@
725LIBTOOL = @LIBTOOL@ 726LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/shell/Makefile.in b/scilab/modules/shell/Makefile.in
index 89f6f93..21b0a76 100644
--- a/scilab/modules/shell/Makefile.in
+++ b/scilab/modules/shell/Makefile.in
@@ -256,6 +256,7 @@ LD = @LD@
256LDFLAGS = @LDFLAGS@ 256LDFLAGS = @LDFLAGS@
257LIBICONV = @LIBICONV@ 257LIBICONV = @LIBICONV@
258LIBINTL = @LIBINTL@ 258LIBINTL = @LIBINTL@
259LIBM = @LIBM@
259LIBOBJS = @LIBOBJS@ 260LIBOBJS = @LIBOBJS@
260LIBS = @LIBS@ 261LIBS = @LIBS@
261LIBTOOL = @LIBTOOL@ 262LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/signal_processing/Makefile.in b/scilab/modules/signal_processing/Makefile.in
index 0f78c6a..0db0354 100644
--- a/scilab/modules/signal_processing/Makefile.in
+++ b/scilab/modules/signal_processing/Makefile.in
@@ -265,6 +265,7 @@ LD = @LD@
265LDFLAGS = @LDFLAGS@ 265LDFLAGS = @LDFLAGS@
266LIBICONV = @LIBICONV@ 266LIBICONV = @LIBICONV@
267LIBINTL = @LIBINTL@ 267LIBINTL = @LIBINTL@
268LIBM = @LIBM@
268LIBOBJS = @LIBOBJS@ 269LIBOBJS = @LIBOBJS@
269LIBS = @LIBS@ 270LIBS = @LIBS@
270LIBTOOL = @LIBTOOL@ 271LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/simulated_annealing/Makefile.in b/scilab/modules/simulated_annealing/Makefile.in
index 58e971c..a1db9cb 100644
--- a/scilab/modules/simulated_annealing/Makefile.in
+++ b/scilab/modules/simulated_annealing/Makefile.in
@@ -204,6 +204,7 @@ LD = @LD@
204LDFLAGS = @LDFLAGS@ 204LDFLAGS = @LDFLAGS@
205LIBICONV = @LIBICONV@ 205LIBICONV = @LIBICONV@
206LIBINTL = @LIBINTL@ 206LIBINTL = @LIBINTL@
207LIBM = @LIBM@
207LIBOBJS = @LIBOBJS@ 208LIBOBJS = @LIBOBJS@
208LIBS = @LIBS@ 209LIBS = @LIBS@
209LIBTOOL = @LIBTOOL@ 210LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/sound/Makefile.in b/scilab/modules/sound/Makefile.in
index 371dc4e..37ec7f1 100644
--- a/scilab/modules/sound/Makefile.in
+++ b/scilab/modules/sound/Makefile.in
@@ -230,6 +230,7 @@ LD = @LD@
230LDFLAGS = @LDFLAGS@ 230LDFLAGS = @LDFLAGS@
231LIBICONV = @LIBICONV@ 231LIBICONV = @LIBICONV@
232LIBINTL = @LIBINTL@ 232LIBINTL = @LIBINTL@
233LIBM = @LIBM@
233LIBOBJS = @LIBOBJS@ 234LIBOBJS = @LIBOBJS@
234LIBS = @LIBS@ 235LIBS = @LIBS@
235LIBTOOL = @LIBTOOL@ 236LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/sparse/Makefile.in b/scilab/modules/sparse/Makefile.in
index 1faee56..f7e6cb1 100644
--- a/scilab/modules/sparse/Makefile.in
+++ b/scilab/modules/sparse/Makefile.in
@@ -1,4 +1,4 @@
1# Makefile.in generated by automake 1.11 from Makefile.am. 1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@ 2# @configure_input@
3 3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -280,6 +280,7 @@ LD = @LD@
280LDFLAGS = @LDFLAGS@ 280LDFLAGS = @LDFLAGS@
281LIBICONV = @LIBICONV@ 281LIBICONV = @LIBICONV@
282LIBINTL = @LIBINTL@ 282LIBINTL = @LIBINTL@
283LIBM = @LIBM@
283LIBOBJS = @LIBOBJS@ 284LIBOBJS = @LIBOBJS@
284LIBS = @LIBS@ 285LIBS = @LIBS@
285LIBTOOL = @LIBTOOL@ 286LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/special_functions/Makefile.in b/scilab/modules/special_functions/Makefile.in
index 68f0f3e..bc9d97c 100644
--- a/scilab/modules/special_functions/Makefile.in
+++ b/scilab/modules/special_functions/Makefile.in
@@ -260,6 +260,7 @@ LD = @LD@
260LDFLAGS = @LDFLAGS@ 260LDFLAGS = @LDFLAGS@
261LIBICONV = @LIBICONV@ 261LIBICONV = @LIBICONV@
262LIBINTL = @LIBINTL@ 262LIBINTL = @LIBINTL@
263LIBM = @LIBM@
263LIBOBJS = @LIBOBJS@ 264LIBOBJS = @LIBOBJS@
264LIBS = @LIBS@ 265LIBS = @LIBS@
265LIBTOOL = @LIBTOOL@ 266LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/spreadsheet/Makefile.in b/scilab/modules/spreadsheet/Makefile.in
index 905f4b9..21230cb 100644
--- a/scilab/modules/spreadsheet/Makefile.in
+++ b/scilab/modules/spreadsheet/Makefile.in
@@ -241,6 +241,7 @@ LD = @LD@
241LDFLAGS = @LDFLAGS@ 241LDFLAGS = @LDFLAGS@
242LIBICONV = @LIBICONV@ 242LIBICONV = @LIBICONV@
243LIBINTL = @LIBINTL@ 243LIBINTL = @LIBINTL@
244LIBM = @LIBM@
244LIBOBJS = @LIBOBJS@ 245LIBOBJS = @LIBOBJS@
245LIBS = @LIBS@ 246LIBS = @LIBS@
246LIBTOOL = @LIBTOOL@ 247LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/statistics/Makefile.in b/scilab/modules/statistics/Makefile.in
index c035cb0..ac1a005 100644
--- a/scilab/modules/statistics/Makefile.in
+++ b/scilab/modules/statistics/Makefile.in
@@ -261,6 +261,7 @@ LD = @LD@
261LDFLAGS = @LDFLAGS@ 261LDFLAGS = @LDFLAGS@
262LIBICONV = @LIBICONV@ 262LIBICONV = @LIBICONV@
263LIBINTL = @LIBINTL@ 263LIBINTL = @LIBINTL@
264LIBM = @LIBM@
264LIBOBJS = @LIBOBJS@ 265LIBOBJS = @LIBOBJS@
265LIBS = @LIBS@ 266LIBS = @LIBS@
266LIBTOOL = @LIBTOOL@ 267LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/string/Makefile.in b/scilab/modules/string/Makefile.in
index 7f771db..37f076e 100644
--- a/scilab/modules/string/Makefile.in
+++ b/scilab/modules/string/Makefile.in
@@ -275,6 +275,7 @@ LD = @LD@
275LDFLAGS = @LDFLAGS@ 275LDFLAGS = @LDFLAGS@
276LIBICONV = @LIBICONV@ 276LIBICONV = @LIBICONV@
277LIBINTL = @LIBINTL@ 277LIBINTL = @LIBINTL@
278LIBM = @LIBM@
278LIBOBJS = @LIBOBJS@ 279LIBOBJS = @LIBOBJS@
279LIBS = @LIBS@ 280LIBS = @LIBS@
280LIBTOOL = @LIBTOOL@ 281LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/symbolic/Makefile.in b/scilab/modules/symbolic/Makefile.in
index 670e975..4d49363 100644
--- a/scilab/modules/symbolic/Makefile.in
+++ b/scilab/modules/symbolic/Makefile.in
@@ -245,6 +245,7 @@ LD = @LD@
245LDFLAGS = @LDFLAGS@ 245LDFLAGS = @LDFLAGS@
246LIBICONV = @LIBICONV@ 246LIBICONV = @LIBICONV@
247LIBINTL = @LIBINTL@ 247LIBINTL = @LIBINTL@
248LIBM = @LIBM@
248LIBOBJS = @LIBOBJS@ 249LIBOBJS = @LIBOBJS@
249LIBS = @LIBS@ 250LIBS = @LIBS@
250LIBTOOL = @LIBTOOL@ 251LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/tclsci/Makefile.in b/scilab/modules/tclsci/Makefile.in
index c9a796d..22609bb 100644
--- a/scilab/modules/tclsci/Makefile.in
+++ b/scilab/modules/tclsci/Makefile.in
@@ -282,6 +282,7 @@ LD = @LD@
282LDFLAGS = @LDFLAGS@ 282LDFLAGS = @LDFLAGS@
283LIBICONV = @LIBICONV@ 283LIBICONV = @LIBICONV@
284LIBINTL = @LIBINTL@ 284LIBINTL = @LIBINTL@
285LIBM = @LIBM@
285LIBOBJS = @LIBOBJS@ 286LIBOBJS = @LIBOBJS@
286LIBS = @LIBS@ 287LIBS = @LIBS@
287LIBTOOL = @LIBTOOL@ 288LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/texmacs/Makefile.in b/scilab/modules/texmacs/Makefile.in
index f837932..2821996 100644
--- a/scilab/modules/texmacs/Makefile.in
+++ b/scilab/modules/texmacs/Makefile.in
@@ -199,6 +199,7 @@ LD = @LD@
199LDFLAGS = @LDFLAGS@ 199LDFLAGS = @LDFLAGS@
200LIBICONV = @LIBICONV@ 200LIBICONV = @LIBICONV@
201LIBINTL = @LIBINTL@ 201LIBINTL = @LIBINTL@
202LIBM = @LIBM@
202LIBOBJS = @LIBOBJS@ 203LIBOBJS = @LIBOBJS@
203LIBS = @LIBS@ 204LIBS = @LIBS@
204LIBTOOL = @LIBTOOL@ 205LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/time/Makefile.in b/scilab/modules/time/Makefile.in
index e63624c..6c07779 100644
--- a/scilab/modules/time/Makefile.in
+++ b/scilab/modules/time/Makefile.in
@@ -237,6 +237,7 @@ LD = @LD@
237LDFLAGS = @LDFLAGS@ 237LDFLAGS = @LDFLAGS@
238LIBICONV = @LIBICONV@ 238LIBICONV = @LIBICONV@
239LIBINTL = @LIBINTL@ 239LIBINTL = @LIBINTL@
240LIBM = @LIBM@
240LIBOBJS = @LIBOBJS@ 241LIBOBJS = @LIBOBJS@
241LIBS = @LIBS@ 242LIBS = @LIBS@
242LIBTOOL = @LIBTOOL@ 243LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/umfpack/Makefile.in b/scilab/modules/umfpack/Makefile.in
index 62f557c..cc7019b 100644
--- a/scilab/modules/umfpack/Makefile.in
+++ b/scilab/modules/umfpack/Makefile.in
@@ -268,6 +268,7 @@ LD = @LD@
268LDFLAGS = @LDFLAGS@ 268LDFLAGS = @LDFLAGS@
269LIBICONV = @LIBICONV@ 269LIBICONV = @LIBICONV@
270LIBINTL = @LIBINTL@ 270LIBINTL = @LIBINTL@
271LIBM = @LIBM@
271LIBOBJS = @LIBOBJS@ 272LIBOBJS = @LIBOBJS@
272LIBS = @LIBS@ 273LIBS = @LIBS@
273LIBTOOL = @LIBTOOL@ 274LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/windows_tools/Makefile.in b/scilab/modules/windows_tools/Makefile.in
index 71b064e..86f0aa0 100644
--- a/scilab/modules/windows_tools/Makefile.in
+++ b/scilab/modules/windows_tools/Makefile.in
@@ -229,6 +229,7 @@ LD = @LD@
229LDFLAGS = @LDFLAGS@ 229LDFLAGS = @LDFLAGS@
230LIBICONV = @LIBICONV@ 230LIBICONV = @LIBICONV@
231LIBINTL = @LIBINTL@ 231LIBINTL = @LIBINTL@
232LIBM = @LIBM@
232LIBOBJS = @LIBOBJS@ 233LIBOBJS = @LIBOBJS@
233LIBS = @LIBS@ 234LIBS = @LIBS@
234LIBTOOL = @LIBTOOL@ 235LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/xcos/Makefile.in b/scilab/modules/xcos/Makefile.in
index 24e6dc3..ec36025 100644
--- a/scilab/modules/xcos/Makefile.in
+++ b/scilab/modules/xcos/Makefile.in
@@ -268,6 +268,7 @@ LD = @LD@
268LDFLAGS = @LDFLAGS@ 268LDFLAGS = @LDFLAGS@
269LIBICONV = @LIBICONV@ 269LIBICONV = @LIBICONV@
270LIBINTL = @LIBINTL@ 270LIBINTL = @LIBINTL@
271LIBM = @LIBM@
271LIBOBJS = @LIBOBJS@ 272LIBOBJS = @LIBOBJS@
272LIBS = @LIBS@ 273LIBS = @LIBS@
273LIBTOOL = @LIBTOOL@ 274LIBTOOL = @LIBTOOL@
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java
index 3772309..72bfa53 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/ScilabGraph.java
@@ -88,7 +88,7 @@ public class ScilabGraph extends mxGraph {
88 setSelectionCells(getSelectionCellsForChanges(changes)); 88 setSelectionCells(getSelectionCellsForChanges(changes));
89 } 89 }
90 }; 90 };
91 91
92 /** 92 /**
93 * Default constructor: - disable unused actions - install listeners - 93 * Default constructor: - disable unused actions - install listeners -
94 * Replace JGraphX components by specialized components if needed. 94 * Replace JGraphX components by specialized components if needed.
@@ -179,6 +179,9 @@ public class ScilabGraph extends mxGraph {
179 */ 179 */
180 protected void setComponent(ScilabComponent component) { 180 protected void setComponent(ScilabComponent component) {
181 this.component = component; 181 this.component = component;
182
183 // Adds rubberband selection
184 rubberBand = new mxRubberband(component);
182 } 185 }
183 186
184 /** 187 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CopyAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CopyAction.java
index 9d7b8d9..af74c7e 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CopyAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CopyAction.java
@@ -21,13 +21,14 @@ import java.awt.event.KeyEvent;
21import javax.swing.TransferHandler; 21import javax.swing.TransferHandler;
22 22
23import org.scilab.modules.graph.ScilabGraph; 23import org.scilab.modules.graph.ScilabGraph;
24import org.scilab.modules.graph.actions.base.SelectionDependantAction;
24import org.scilab.modules.graph.utils.ScilabGraphMessages; 25import org.scilab.modules.graph.utils.ScilabGraphMessages;
25import org.scilab.modules.gui.menuitem.MenuItem; 26import org.scilab.modules.gui.menuitem.MenuItem;
26 27
27/** 28/**
28 * Copy manager 29 * Copy manager
29 */ 30 */
30public final class CopyAction extends DefaultAction { 31public final class CopyAction extends SelectionDependantAction {
31 public static final String NAME = ScilabGraphMessages.COPY; 32 public static final String NAME = ScilabGraphMessages.COPY;
32 public static final String SMALL_ICON = "edit-copy.png"; 33 public static final String SMALL_ICON = "edit-copy.png";
33 public static final int MNEMONIC_KEY = KeyEvent.VK_C; 34 public static final int MNEMONIC_KEY = KeyEvent.VK_C;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CutAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CutAction.java
index 80bed2a..2a1e6bb 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CutAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/CutAction.java
@@ -21,13 +21,14 @@ import java.awt.event.KeyEvent;
21import javax.swing.TransferHandler; 21import javax.swing.TransferHandler;
22 22
23import org.scilab.modules.graph.ScilabGraph; 23import org.scilab.modules.graph.ScilabGraph;
24import org.scilab.modules.graph.actions.base.SelectionDependantAction;
24import org.scilab.modules.graph.utils.ScilabGraphMessages; 25import org.scilab.modules.graph.utils.ScilabGraphMessages;
25import org.scilab.modules.gui.menuitem.MenuItem; 26import org.scilab.modules.gui.menuitem.MenuItem;
26 27
27/** 28/**
28 * Cut manager 29 * Cut manager
29 */ 30 */
30public final class CutAction extends DefaultAction { 31public final class CutAction extends SelectionDependantAction {
31 public static final String NAME = ScilabGraphMessages.CUT; 32 public static final String NAME = ScilabGraphMessages.CUT;
32 public static final String SMALL_ICON = "edit-cut.png"; 33 public static final String SMALL_ICON = "edit-cut.png";
33 public static final int MNEMONIC_KEY = KeyEvent.VK_X; 34 public static final int MNEMONIC_KEY = KeyEvent.VK_X;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DeleteAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DeleteAction.java
index fcb8ac5..60920c1 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DeleteAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DeleteAction.java
@@ -17,6 +17,7 @@ import java.awt.event.ActionEvent;
17import java.awt.event.KeyEvent; 17import java.awt.event.KeyEvent;
18 18
19import org.scilab.modules.graph.ScilabGraph; 19import org.scilab.modules.graph.ScilabGraph;
20import org.scilab.modules.graph.actions.base.SelectionDependantAction;
20import org.scilab.modules.graph.utils.ScilabGraphMessages; 21import org.scilab.modules.graph.utils.ScilabGraphMessages;
21import org.scilab.modules.gui.menuitem.MenuItem; 22import org.scilab.modules.gui.menuitem.MenuItem;
22import org.scilab.modules.gui.pushbutton.PushButton; 23import org.scilab.modules.gui.pushbutton.PushButton;
@@ -24,7 +25,7 @@ import org.scilab.modules.gui.pushbutton.PushButton;
24/** 25/**
25 * Delete manager 26 * Delete manager
26 */ 27 */
27public final class DeleteAction extends DefaultAction { 28public final class DeleteAction extends SelectionDependantAction {
28 public static final String NAME = ScilabGraphMessages.DELETE; 29 public static final String NAME = ScilabGraphMessages.DELETE;
29 public static final String SMALL_ICON = "edit-delete.png"; 30 public static final String SMALL_ICON = "edit-delete.png";
30 public static final int MNEMONIC_KEY = KeyEvent.VK_DELETE; 31 public static final int MNEMONIC_KEY = KeyEvent.VK_DELETE;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GroupAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GroupAction.java
index e030e01..657368a 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GroupAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GroupAction.java
@@ -19,6 +19,8 @@ import java.awt.event.ActionEvent;
19import java.awt.event.KeyEvent; 19import java.awt.event.KeyEvent;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.base.DefaultAction;
23import org.scilab.modules.graph.actions.base.MultiSelectionDependantAction;
22import org.scilab.modules.graph.utils.ScilabGraphMessages; 24import org.scilab.modules.graph.utils.ScilabGraphMessages;
23import org.scilab.modules.gui.menuitem.MenuItem; 25import org.scilab.modules.gui.menuitem.MenuItem;
24 26
@@ -27,7 +29,7 @@ import com.mxgraph.swing.util.mxGraphActions;
27/** 29/**
28 * Group any blocks and ease the manipulation of them. 30 * Group any blocks and ease the manipulation of them.
29 */ 31 */
30public class GroupAction extends DefaultAction { 32public class GroupAction extends MultiSelectionDependantAction {
31 public static final String NAME = ScilabGraphMessages.GROUP; 33 public static final String NAME = ScilabGraphMessages.GROUP;
32 public static final String SMALL_ICON = ""; 34 public static final String SMALL_ICON = "";
33 public static final int MNEMONIC_KEY = KeyEvent.VK_G; 35 public static final int MNEMONIC_KEY = KeyEvent.VK_G;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/InvertSelectionAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/InvertSelectionAction.java
index d8ac945..1c80766 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/InvertSelectionAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/InvertSelectionAction.java
@@ -16,6 +16,7 @@ package org.scilab.modules.graph.actions;
16import java.awt.event.ActionEvent; 16import java.awt.event.ActionEvent;
17 17
18import org.scilab.modules.graph.ScilabGraph; 18import org.scilab.modules.graph.ScilabGraph;
19import org.scilab.modules.graph.actions.base.DefaultAction;
19import org.scilab.modules.graph.utils.ScilabGraphMessages; 20import org.scilab.modules.graph.utils.ScilabGraphMessages;
20import org.scilab.modules.gui.menuitem.MenuItem; 21import org.scilab.modules.gui.menuitem.MenuItem;
21 22
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/PasteAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/PasteAction.java
index 8962b38..052faa6 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/PasteAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/PasteAction.java
@@ -21,13 +21,14 @@ import java.awt.event.KeyEvent;
21import javax.swing.TransferHandler; 21import javax.swing.TransferHandler;
22 22
23import org.scilab.modules.graph.ScilabGraph; 23import org.scilab.modules.graph.ScilabGraph;
24import org.scilab.modules.graph.actions.base.SelectionDependantAction;
24import org.scilab.modules.graph.utils.ScilabGraphMessages; 25import org.scilab.modules.graph.utils.ScilabGraphMessages;
25import org.scilab.modules.gui.menuitem.MenuItem; 26import org.scilab.modules.gui.menuitem.MenuItem;
26 27
27/** 28/**
28 * Paste manager 29 * Paste manager
29 */ 30 */
30public final class PasteAction extends DefaultAction { 31public final class PasteAction extends SelectionDependantAction {
31 public static final String NAME = ScilabGraphMessages.PASTE; 32 public static final String NAME = ScilabGraphMessages.PASTE;
32 public static final String SMALL_ICON = "edit-paste.png"; 33 public static final String SMALL_ICON = "edit-paste.png";
33 public static final int MNEMONIC_KEY = KeyEvent.VK_V; 34 public static final int MNEMONIC_KEY = KeyEvent.VK_V;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/RedoAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/RedoAction.java
index b8003e6..c2605fc 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/RedoAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/RedoAction.java
@@ -19,6 +19,7 @@ import java.awt.event.ActionEvent;
19import java.awt.event.KeyEvent; 19import java.awt.event.KeyEvent;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.base.DefaultAction;
22import org.scilab.modules.graph.utils.ScilabGraphMessages; 23import org.scilab.modules.graph.utils.ScilabGraphMessages;
23import org.scilab.modules.gui.menuitem.MenuItem; 24import org.scilab.modules.gui.menuitem.MenuItem;
24import org.scilab.modules.gui.pushbutton.PushButton; 25import org.scilab.modules.gui.pushbutton.PushButton;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/SelectAllAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/SelectAllAction.java
index a8256be..7c16c1e 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/SelectAllAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/SelectAllAction.java
@@ -18,6 +18,7 @@ import java.awt.event.ActionEvent;
18import java.awt.event.KeyEvent; 18import java.awt.event.KeyEvent;
19 19
20import org.scilab.modules.graph.ScilabGraph; 20import org.scilab.modules.graph.ScilabGraph;
21import org.scilab.modules.graph.actions.base.DefaultAction;
21import org.scilab.modules.graph.utils.ScilabGraphMessages; 22import org.scilab.modules.graph.utils.ScilabGraphMessages;
22import org.scilab.modules.gui.menuitem.MenuItem; 23import org.scilab.modules.gui.menuitem.MenuItem;
23 24
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UnGroupAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UnGroupAction.java
index 37d2deb..8df0d55 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UnGroupAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UnGroupAction.java
@@ -19,6 +19,7 @@ import java.awt.event.ActionEvent;
19import java.awt.event.KeyEvent; 19import java.awt.event.KeyEvent;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.base.DefaultAction;
22import org.scilab.modules.graph.utils.ScilabGraphMessages; 23import org.scilab.modules.graph.utils.ScilabGraphMessages;
23import org.scilab.modules.gui.menuitem.MenuItem; 24import org.scilab.modules.gui.menuitem.MenuItem;
24 25
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UndoAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UndoAction.java
index 3d5b48a..417be30 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UndoAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/UndoAction.java
@@ -19,6 +19,7 @@ import java.awt.event.ActionEvent;
19import java.awt.event.KeyEvent; 19import java.awt.event.KeyEvent;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.base.DefaultAction;
22import org.scilab.modules.graph.utils.ScilabGraphMessages; 23import org.scilab.modules.graph.utils.ScilabGraphMessages;
23import org.scilab.modules.gui.menuitem.MenuItem; 24import org.scilab.modules.gui.menuitem.MenuItem;
24import org.scilab.modules.gui.pushbutton.PushButton; 25import org.scilab.modules.gui.pushbutton.PushButton;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomInAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomInAction.java
index 301abb6..f2fc4ae 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomInAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomInAction.java
@@ -18,6 +18,7 @@ import java.awt.event.ActionEvent;
18import java.awt.event.KeyEvent; 18import java.awt.event.KeyEvent;
19 19
20import org.scilab.modules.graph.ScilabGraph; 20import org.scilab.modules.graph.ScilabGraph;
21import org.scilab.modules.graph.actions.base.DefaultAction;
21import org.scilab.modules.graph.utils.ScilabGraphMessages; 22import org.scilab.modules.graph.utils.ScilabGraphMessages;
22import org.scilab.modules.gui.menuitem.MenuItem; 23import org.scilab.modules.gui.menuitem.MenuItem;
23import org.scilab.modules.gui.pushbutton.PushButton; 24import org.scilab.modules.gui.pushbutton.PushButton;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java
index e7ca3a8..9b24582 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java
@@ -19,6 +19,7 @@ import java.awt.event.ActionListener;
19import java.awt.event.KeyEvent; 19import java.awt.event.KeyEvent;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.base.DefaultAction;
22import org.scilab.modules.graph.utils.ScilabGraphMessages; 23import org.scilab.modules.graph.utils.ScilabGraphMessages;
23import org.scilab.modules.gui.menuitem.MenuItem; 24import org.scilab.modules.gui.menuitem.MenuItem;
24import org.scilab.modules.gui.pushbutton.PushButton; 25import org.scilab.modules.gui.pushbutton.PushButton;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DefaultAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/DefaultAction.java
index 3c9daa0..2dd2985 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/DefaultAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/DefaultAction.java
@@ -11,7 +11,7 @@
11 * 11 *
12 */ 12 */
13 13
14package org.scilab.modules.graph.actions; 14package org.scilab.modules.graph.actions.base;
15 15
16import java.awt.Component; 16import java.awt.Component;
17import java.awt.event.ActionEvent; 17import java.awt.event.ActionEvent;
@@ -19,7 +19,6 @@ import java.awt.event.ActionListener;
19 19
20import javax.swing.Action; 20import javax.swing.Action;
21import javax.swing.ImageIcon; 21import javax.swing.ImageIcon;
22import javax.swing.JOptionPane;
23import javax.swing.KeyStroke; 22import javax.swing.KeyStroke;
24 23
25import org.scilab.modules.graph.ScilabGraph; 24import org.scilab.modules.graph.ScilabGraph;
@@ -38,9 +37,8 @@ import com.mxgraph.swing.mxGraphComponent;
38 37
39/** 38/**
40 * Default action for a Scilab Graph 39 * Default action for a Scilab Graph
41 * @author Bruno JOFFRET
42 */ 40 */
43public class DefaultAction extends CallBack { 41public abstract class DefaultAction extends CallBack {
44 private static final String ICON_PATH = System.getenv("SCI") 42 private static final String ICON_PATH = System.getenv("SCI")
45 + "/modules/xcos/images/icons/"; 43 + "/modules/xcos/images/icons/";
46 44
@@ -68,6 +66,13 @@ public class DefaultAction extends CallBack {
68 super(""); 66 super("");
69 this.scilabGraph = scilabGraph; 67 this.scilabGraph = scilabGraph;
70 68
69 installProperties();
70 }
71
72 /**
73 * Install the static actions properties on the instance
74 */
75 private void installProperties() {
71 String name = ""; 76 String name = "";
72 String icon = ""; 77 String icon = "";
73 int mnemonic = 0; 78 int mnemonic = 0;
@@ -121,7 +126,7 @@ public class DefaultAction extends CallBack {
121 */ 126 */
122 protected static MenuItem createMenu(ScilabGraph graph, 127 protected static MenuItem createMenu(ScilabGraph graph,
123 final Class< ? extends DefaultAction> klass) { 128 final Class< ? extends DefaultAction> klass) {
124 DefaultAction action = GraphActionFactory.getInstance(graph, klass); 129 DefaultAction action = GraphActionManager.getInstance(graph, klass);
125 MenuItem item = ScilabMenuItem.createMenuItem(); 130 MenuItem item = ScilabMenuItem.createMenuItem();
126 131
127 SwingScilabMenuItem swingItem = (SwingScilabMenuItem) item 132 SwingScilabMenuItem swingItem = (SwingScilabMenuItem) item
@@ -142,7 +147,7 @@ public class DefaultAction extends CallBack {
142 */ 147 */
143 protected static PushButton createButton(ScilabGraph graph, 148 protected static PushButton createButton(ScilabGraph graph,
144 final Class< ? extends DefaultAction> klass) { 149 final Class< ? extends DefaultAction> klass) {
145 DefaultAction action = GraphActionFactory.getInstance(graph, klass); 150 DefaultAction action = GraphActionManager.getInstance(graph, klass);
146 PushButton item = ScilabPushButton.createPushButton(); 151 PushButton item = ScilabPushButton.createPushButton();
147 152
148 SwingScilabPushButton swingItem = (SwingScilabPushButton) item 153 SwingScilabPushButton swingItem = (SwingScilabPushButton) item
@@ -166,7 +171,7 @@ public class DefaultAction extends CallBack {
166 */ 171 */
167 protected static CheckBoxMenuItem createCheckBoxMenu(ScilabGraph graph, 172 protected static CheckBoxMenuItem createCheckBoxMenu(ScilabGraph graph,
168 Class< ? extends DefaultAction> klass) { 173 Class< ? extends DefaultAction> klass) {
169 DefaultAction action = GraphActionFactory.getInstance(graph, klass); 174 DefaultAction action = GraphActionManager.getInstance(graph, klass);
170 CheckBoxMenuItem item = ScilabCheckBoxMenuItem.createCheckBoxMenuItem(); 175 CheckBoxMenuItem item = ScilabCheckBoxMenuItem.createCheckBoxMenuItem();
171 176
172 SwingScilabCheckBoxMenuItem swingItem = (SwingScilabCheckBoxMenuItem) item 177 SwingScilabCheckBoxMenuItem swingItem = (SwingScilabCheckBoxMenuItem) item
@@ -278,19 +283,21 @@ public class DefaultAction extends CallBack {
278 283
279 return menu; 284 return menu;
280 } 285 }
281 286
282 /** 287 /**
283 * Action associated 288 * Action
289 * @param e parameters
290 * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
284 */ 291 */
285 public void doAction() { 292 @Override
286 JOptionPane.showMessageDialog(getGraph(null).getAsComponent(), "Not Implemented Now !!!", null, JOptionPane.ERROR_MESSAGE); 293 public abstract void actionPerformed(ActionEvent e);
287 } 294
288
289 /** 295 /**
290 * Action associated 296 * Not used
297 * @see org.scilab.modules.gui.events.callback.CallBack#callBack()
291 */ 298 */
299 @Override
292 public void callBack() { 300 public void callBack() {
293 doAction(); 301 assert "Must never be called as we bypass Callback.java".equals("");
294 } 302 }
295
296} 303}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GraphActionFactory.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/GraphActionManager.java
index b793573..3a7ae0e 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/GraphActionFactory.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/GraphActionManager.java
@@ -10,7 +10,7 @@
10 * 10 *
11 */ 11 */
12 12
13package org.scilab.modules.graph.actions; 13package org.scilab.modules.graph.actions.base;
14 14
15import java.lang.reflect.InvocationTargetException; 15import java.lang.reflect.InvocationTargetException;
16import java.util.HashSet; 16import java.util.HashSet;
@@ -20,10 +20,12 @@ import java.util.Set;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22 22
23import com.mxgraph.model.mxCell;
24
23/** 25/**
24 * Implement construction methods for Actions. 26 * Implement construction methods for Actions.
25 */ 27 */
26public final class GraphActionFactory { 28public final class GraphActionManager {
27 private static Map<ScilabGraph, Set<DefaultAction>> perGraphAction = 29 private static Map<ScilabGraph, Set<DefaultAction>> perGraphAction =
28 new Hashtable<ScilabGraph, Set<DefaultAction>>(); 30 new Hashtable<ScilabGraph, Set<DefaultAction>>();
29 private static Set<DefaultAction> nullGraphAction = new HashSet<DefaultAction>(); 31 private static Set<DefaultAction> nullGraphAction = new HashSet<DefaultAction>();
@@ -31,7 +33,7 @@ public final class GraphActionFactory {
31 /** 33 /**
32 * Static class so private constructor 34 * Static class so private constructor
33 */ 35 */
34 private GraphActionFactory() { } 36 private GraphActionManager() { }
35 37
36 /** 38 /**
37 * As each action is unique per graph, get the action instance for the 39 * As each action is unique per graph, get the action instance for the
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/MultiSelectionDependantAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/MultiSelectionDependantAction.java
new file mode 100644
index 0000000..2ea8aad
--- /dev/null
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/MultiSelectionDependantAction.java
@@ -0,0 +1,76 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Clément DAVID
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12
13package org.scilab.modules.graph.actions.base;
14
15import org.scilab.modules.graph.ScilabGraph;
16
17import com.mxgraph.util.mxEvent;
18import com.mxgraph.util.mxEventObject;
19import com.mxgraph.util.mxEventSource.mxIEventListener;
20
21/**
22 * Common class for multi-selection dependent actions.
23 *
24 * Children of this class will be activated when there something selected. If
25 * not, the action will be disabled.
26 */
27public abstract class MultiSelectionDependantAction extends DefaultAction {
28
29 /**
30 * Implement the listener to install on the graph
31 */
32 private class MultiSelectionChangeListener implements mxIEventListener {
33 private ScilabGraph scilabGraph;
34
35 /**
36 * Default constructor
37 *
38 * @param scilabGraph
39 * the associated graph
40 */
41 public MultiSelectionChangeListener(ScilabGraph scilabGraph) {
42 this.scilabGraph = scilabGraph;
43 }
44
45 /**
46 * Enable or disable the action.
47 *
48 * @param sender
49 * the sender
50 * @param evt
51 * the event
52 * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object,
53 * com.mxgraph.util.mxEventObject)
54 */
55 public void invoke(Object sender, mxEventObject evt) {
56 Object[] cells = scilabGraph.getSelectionCells();
57 setEnabled((cells != null) && (cells.length > 1));
58 }
59
60 }
61
62 /**
63 * Default constructor
64 *
65 * @param scilabGraph
66 * the associated graph
67 */
68 public MultiSelectionDependantAction(ScilabGraph scilabGraph) {
69 super(scilabGraph);
70
71 if (scilabGraph != null) {
72 scilabGraph.getSelectionModel().addListener(mxEvent.UNDO,
73 new MultiSelectionChangeListener(scilabGraph));
74 }
75 }
76}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/SelectionDependantAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/SelectionDependantAction.java
new file mode 100644
index 0000000..bcf840e
--- /dev/null
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/graph/actions/base/SelectionDependantAction.java
@@ -0,0 +1,77 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Clément DAVID
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 *
11 */
12
13package org.scilab.modules.graph.actions.base;
14
15import org.scilab.modules.graph.ScilabGraph;
16
17import com.mxgraph.util.mxEvent;
18import com.mxgraph.util.mxEventObject;
19import com.mxgraph.util.mxEventSource.mxIEventListener;
20
21/**
22 * Common class for selection dependent actions.
23 *
24 * Children of this class will be activated when there something selected. If
25 * not, the action will be disabled.
26 */
27public abstract class SelectionDependantAction extends DefaultAction {
28
29 /**
30 * Implement the listener to install on the graph
31 */
32 private class SelectionChangeListener implements mxIEventListener {
33 private ScilabGraph scilabGraph;
34
35 /**
36 * Default constructor
37 *
38 * @param scilabGraph
39 * the associated graph
40 */
41 public SelectionChangeListener(ScilabGraph scilabGraph) {
42 this.scilabGraph = scilabGraph;
43 }
44
45 /**
46 * Enable or disable the action.
47 *
48 * @param sender
49 * the sender
50 * @param evt
51 * the event
52 * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object,
53 * com.mxgraph.util.mxEventObject)
54 */
55 public void invoke(Object sender, mxEventObject evt) {
56 Object[] cells = scilabGraph.getSelectionCells();
57 setEnabled((cells != null) && (cells.length != 0));
58 }
59
60 }
61
62 /**
63 * Default constructor
64 *
65 * @param scilabGraph
66 * The associated graph
67 */
68 public SelectionDependantAction(ScilabGraph scilabGraph) {
69 super(scilabGraph);
70 setEnabled(false);
71
72 if (scilabGraph != null) {
73 scilabGraph.getSelectionModel().addListener(mxEvent.UNDO,
74 new SelectionChangeListener(scilabGraph));
75 }
76 }
77}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java
index 7598a73..6a2814e 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java
@@ -14,8 +14,10 @@
14 14
15package org.scilab.modules.xcos.actions; 15package org.scilab.modules.xcos.actions;
16 16
17import java.awt.event.ActionEvent;
18
17import org.scilab.modules.graph.ScilabGraph; 19import org.scilab.modules.graph.ScilabGraph;
18import org.scilab.modules.graph.actions.DefaultAction; 20import org.scilab.modules.graph.actions.base.DefaultAction;
19import org.scilab.modules.gui.menuitem.MenuItem; 21import org.scilab.modules.gui.menuitem.MenuItem;
20import org.scilab.modules.gui.utils.ScilabAboutBox; 22import org.scilab.modules.gui.utils.ScilabAboutBox;
21import org.scilab.modules.xcos.Xcos; 23import org.scilab.modules.xcos.Xcos;
@@ -49,10 +51,11 @@ public class AboutXcosAction extends DefaultAction {
49 } 51 }
50 52
51 /** 53 /**
52 * Action !! 54 * @param e parameter
53 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 55 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
54 */ 56 */
55 public void doAction() { 57 @Override
58 public void actionPerformed(ActionEvent e) {
56 String[] contents = { 59 String[] contents = {
57 Xcos.TRADENAME + " - " + Xcos.VERSION, 60 Xcos.TRADENAME + " - " + Xcos.VERSION,
58 "", 61 "",
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java
index 459460f..40dfed8 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java
@@ -14,10 +14,11 @@
14package org.scilab.modules.xcos.actions; 14package org.scilab.modules.xcos.actions;
15 15
16import java.awt.Toolkit; 16import java.awt.Toolkit;
17import java.awt.event.ActionEvent;
17import java.awt.event.KeyEvent; 18import java.awt.event.KeyEvent;
18 19
19import org.scilab.modules.graph.ScilabGraph; 20import org.scilab.modules.graph.ScilabGraph;
20import org.scilab.modules.graph.actions.DefaultAction; 21import org.scilab.modules.graph.actions.base.DefaultAction;
21import org.scilab.modules.gui.menuitem.MenuItem; 22import org.scilab.modules.gui.menuitem.MenuItem;
22import org.scilab.modules.xcos.graph.SuperBlockDiagram; 23import org.scilab.modules.xcos.graph.SuperBlockDiagram;
23import org.scilab.modules.xcos.graph.XcosDiagram; 24import org.scilab.modules.xcos.graph.XcosDiagram;
@@ -50,10 +51,11 @@ public class CloseAction extends DefaultAction {
50 } 51 }
51 52
52 /** 53 /**
53 * Action !! 54 * @param e parameter
54 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 55 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
55 */ 56 */
56 public void doAction() { 57 @Override
58 public void actionPerformed(ActionEvent e) {
57 if (getGraph(null) instanceof SuperBlockDiagram) { 59 if (getGraph(null) instanceof SuperBlockDiagram) {
58 ((SuperBlockDiagram) getGraph(null)).getContainer().closeBlockSettings(); 60 ((SuperBlockDiagram) getGraph(null)).getContainer().closeBlockSettings();
59 } else { 61 } else {
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseViewportAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseViewportAction.java
index ea1aaa9..d184d17 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseViewportAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseViewportAction.java
@@ -14,10 +14,11 @@
14package org.scilab.modules.xcos.actions; 14package org.scilab.modules.xcos.actions;
15 15
16import java.awt.Toolkit; 16import java.awt.Toolkit;
17import java.awt.event.ActionEvent;
17import java.awt.event.KeyEvent; 18import java.awt.event.KeyEvent;
18 19
19import org.scilab.modules.graph.ScilabGraph; 20import org.scilab.modules.graph.ScilabGraph;
20import org.scilab.modules.graph.actions.DefaultAction; 21import org.scilab.modules.graph.actions.base.DefaultAction;
21import org.scilab.modules.gui.menuitem.MenuItem; 22import org.scilab.modules.gui.menuitem.MenuItem;
22import org.scilab.modules.xcos.graph.XcosDiagram; 23import org.scilab.modules.xcos.graph.XcosDiagram;
23import org.scilab.modules.xcos.utils.XcosMessages; 24import org.scilab.modules.xcos.utils.XcosMessages;
@@ -49,10 +50,11 @@ public class CloseViewportAction extends DefaultAction {
49 } 50 }
50 51
51 /** 52 /**
52 * Action !! 53 * @param e parameter
53 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 54 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
54 */ 55 */
55 public void doAction() { 56 @Override
57 public void actionPerformed(ActionEvent e) {
56 ((XcosDiagram) getGraph(null)).setViewPortVisible(false); 58 ((XcosDiagram) getGraph(null)).setViewPortVisible(false);
57 } 59 }
58} 60}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java
index ed55edb..b708cf9 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CodeGenerationAction.java
@@ -21,7 +21,7 @@ import java.io.IOException;
21import ncsa.hdf.hdf5lib.exceptions.HDF5Exception; 21import ncsa.hdf.hdf5lib.exceptions.HDF5Exception;
22 22
23import org.scilab.modules.graph.ScilabGraph; 23import org.scilab.modules.graph.ScilabGraph;
24import org.scilab.modules.graph.actions.DefaultAction; 24import org.scilab.modules.graph.actions.base.DefaultAction;
25import org.scilab.modules.gui.menuitem.MenuItem; 25import org.scilab.modules.gui.menuitem.MenuItem;
26import org.scilab.modules.hdf5.write.H5Write; 26import org.scilab.modules.hdf5.write.H5Write;
27import org.scilab.modules.xcos.block.BasicBlock; 27import org.scilab.modules.xcos.block.BasicBlock;
@@ -63,11 +63,12 @@ public class CodeGenerationAction extends DefaultAction {
63 return createMenu(scilabGraph, CodeGenerationAction.class); 63 return createMenu(scilabGraph, CodeGenerationAction.class);
64 } 64 }
65 65
66 /** 66 /**
67 * Action !! 67 * @param e parameter
68 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 68 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
69 */ 69 */
70 public void doAction() { 70 @Override
71 public void actionPerformed(ActionEvent e) {
71 Object selectedObj = getGraph(null).getSelectionCell(); 72 Object selectedObj = getGraph(null).getSelectionCell();
72 if (!(selectedObj instanceof SuperBlock)) { 73 if (!(selectedObj instanceof SuperBlock)) {
73 ((XcosDiagram) getGraph(null)).error(XcosMessages.ERROR_GENERATING_C_CODE); 74 ((XcosDiagram) getGraph(null)).error(XcosMessages.ERROR_GENERATING_C_CODE);
@@ -103,14 +104,14 @@ public class CodeGenerationAction extends DefaultAction {
103 }; 104 };
104 105
105 XcosInterpreterManagement.asynchronousScilabExec(command, callback); 106 XcosInterpreterManagement.asynchronousScilabExec(command, callback);
106 } catch (IOException e) { 107 } catch (IOException ex) {
107 e.printStackTrace(); 108 ex.printStackTrace();
108 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO); 109 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO);
109 } catch (HDF5Exception e) { 110 } catch (HDF5Exception ex) {
110 e.printStackTrace(); 111 ex.printStackTrace();
111 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO); 112 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO);
112 } catch (InterpreterException e) { 113 } catch (InterpreterException ex) {
113 e.printStackTrace(); 114 ex.printStackTrace();
114 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO); 115 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO);
115 } 116 }
116 } 117 }
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
index cfde292..eacac99 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
@@ -19,7 +19,7 @@ import java.io.File;
19import java.io.IOException; 19import java.io.IOException;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.DefaultAction; 22import org.scilab.modules.graph.actions.base.DefaultAction;
23import org.scilab.modules.gui.menuitem.MenuItem; 23import org.scilab.modules.gui.menuitem.MenuItem;
24import org.scilab.modules.xcos.graph.XcosDiagram; 24import org.scilab.modules.xcos.graph.XcosDiagram;
25import org.scilab.modules.xcos.utils.XcosInterpreterManagement; 25import org.scilab.modules.xcos.utils.XcosInterpreterManagement;
@@ -53,10 +53,11 @@ public class CompileAction extends DefaultAction {
53 } 53 }
54 54
55 /** 55 /**
56 * Action !! 56 * @param e parameter
57 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 57 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
58 */ 58 */
59 public void doAction() { 59 @Override
60 public void actionPerformed(ActionEvent e) {
60 ((XcosDiagram) getGraph(null)).info(XcosMessages.COMPILATION_IN_PROGRESS); 61 ((XcosDiagram) getGraph(null)).info(XcosMessages.COMPILATION_IN_PROGRESS);
61 Thread launchMe = new Thread() { 62 Thread launchMe = new Thread() {
62 public void run() { 63 public void run() {
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java
index ce0e2fc..d03cc9c 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java
@@ -35,7 +35,7 @@ import javax.swing.JPanel;
35import javax.swing.ListSelectionModel; 35import javax.swing.ListSelectionModel;
36 36
37import org.scilab.modules.graph.ScilabGraph; 37import org.scilab.modules.graph.ScilabGraph;
38import org.scilab.modules.graph.actions.DefaultAction; 38import org.scilab.modules.graph.actions.base.DefaultAction;
39import org.scilab.modules.gui.menuitem.MenuItem; 39import org.scilab.modules.gui.menuitem.MenuItem;
40import org.scilab.modules.xcos.graph.XcosDiagram; 40import org.scilab.modules.xcos.graph.XcosDiagram;
41import org.scilab.modules.xcos.utils.XcosInterpreterManagement; 41import org.scilab.modules.xcos.utils.XcosInterpreterManagement;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java
index 71a8292..e022f42 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java
@@ -14,11 +14,12 @@
14package org.scilab.modules.xcos.actions; 14package org.scilab.modules.xcos.actions;
15 15
16import java.awt.Color; 16import java.awt.Color;
17import java.awt.event.ActionEvent;
17 18
18import javax.swing.JColorChooser; 19import javax.swing.JColorChooser;
19 20
20import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
21import org.scilab.modules.graph.actions.DefaultAction; 22import org.scilab.modules.graph.actions.base.DefaultAction;
22import org.scilab.modules.gui.menuitem.MenuItem; 23import org.scilab.modules.gui.menuitem.MenuItem;
23import org.scilab.modules.xcos.utils.XcosMessages; 24import org.scilab.modules.xcos.utils.XcosMessages;
24 25
@@ -51,10 +52,11 @@ public class DiagramBackgroundAction extends DefaultAction {
51 } 52 }
52 53
53 /** 54 /**
54 * Action !! 55 * @param e parameter
55 * @see org.scilab.modules.graph.actions.DefaultAction#doAction() 56 * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
56 */ 57 */
57 public void doAction() { 58 @Override
59 public void actionPerformed(ActionEvent e) {
58 mxGraphComponent graphComponent = getGraph(null).getAsComponent(); 60 mxGraphComponent graphComponent = getGraph(null).getAsComponent();
59 Color newColor = JColorChooser.showDialog(graphComponent, XcosMessages.DIAGRAM_BACKGROUND, null); 61 Color newColor = JColorChooser.showDialog(graphComponent, XcosMessages.DIAGRAM_BACKGROUND, null);
60 62
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java
index fcda1c2..bb4c5a8 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java
@@ -19,7 +19,7 @@ import java.io.File;
19import java.io.IOException; 19import java.io.IOException;
20 20
21import org.scilab.modules.graph.ScilabGraph; 21import org.scilab.modules.graph.ScilabGraph;
22import org.scilab.modules.graph.actions.DefaultAction; 22<