aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/elogr.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/gio/elogr.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/elogr.x')
-rw-r--r--sys/gio/elogr.x27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/gio/elogr.x b/sys/gio/elogr.x
new file mode 100644
index 00000000..3dfb26ee
--- /dev/null
+++ b/sys/gio/elogr.x
@@ -0,0 +1,27 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# ELOGR -- Extended range log function. Logarithmic scaling function for
+# negative or partially negative data. The function is piecewise, continuous,
+# monotonic, reasonably smooth, and most importantly, is defined for all x.
+#
+# 10.0 < X y = log(x)
+# -10.0 <= X <= 10.0 y = x / 10.0
+# X < -10.0 y = -log(-x)
+#
+# Axes scaled with this function should have ticks labelled, e.g., 10**3,
+# 10**2, 10**1, 0, -10**1, -10**2, -10**3. The corresponding ticks for
+# the normal log function would have values like 10**-2 rather than -10**2,
+# hence it is not difficult to distinguish between the two functions.
+
+real procedure elogr (x)
+
+real x
+
+begin
+ if (x > 10.0)
+ return (log10 (x))
+ else if (x >= -10.0)
+ return (x / 10.0)
+ else
+ return (-log10 (-x))
+end