GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
mappers.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1996-2026 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_oct_mappers_h)
27#define octave_oct_mappers_h 1
28
29#include "octave-config.h"
30
31#include <cmath>
32
33#include <limits>
34
35#include "lo-ieee.h"
36#include "oct-cmplx.h"
37#include "oct-inttypes-fwd.h"
38
39// Provides some commonly repeated, basic loop templates.
40
41// Specialization for octave_int types
42template <typename T>
43inline auto mappers_abs (const octave_int<T>& x)
44{
45 if constexpr (std::is_unsigned_v<T>)
46 return x; // abs doesn't make sense for unsigned types
47 else
48 return std::abs (x.value ());
49}
50
51
54
55extern OCTAVE_API bool isna (double x);
56extern OCTAVE_API bool isna (float x);
57extern OCTAVE_API bool isna (const Complex& x);
58extern OCTAVE_API bool isna (const FloatComplex& x);
59
60extern OCTAVE_API bool is_NaN_or_NA (const Complex& x);
61extern OCTAVE_API bool is_NaN_or_NA (const FloatComplex& x);
62
63inline double copysign (double x, double y) { return std::copysign (x, y); }
64inline float copysign (float x, float y) { return std::copysignf (x, y); }
65
66inline double signbit (double x) { return std::signbit (x); }
67inline float signbit (float x) { return std::signbit (x); }
68
69// Test for negative sign.
70extern OCTAVE_API bool negative_sign (double x);
71extern OCTAVE_API bool negative_sign (float x);
72
73// Test for positive sign.
74inline bool positive_sign (double x) { return ! negative_sign (x); }
75inline bool positive_sign (float x) { return ! negative_sign (x); }
76
77extern OCTAVE_API Complex acos (const Complex& x);
79
80extern OCTAVE_API Complex asin (const Complex& x);
82
83inline Complex atan (const Complex& x) { return std::atan (x); }
84inline FloatComplex atan (const FloatComplex& x) { return std::atan (x); }
85
86// The C++ standard would normally return a std::complex value for conj
87// even when the input is fully real. Octave overrides this.
88inline double conj (double x) { return x; }
89inline float conj (float x) { return x; }
90
91template <typename T>
92std::complex<T>
93conj (const std::complex<T>& x)
94{
95 return std::conj (x);
96}
97
98inline double log2 (double x) { return std::log2 (x); }
99inline float log2 (float x) { return std::log2f (x); }
100
101extern OCTAVE_API Complex log2 (const Complex& x);
103
104extern OCTAVE_API double log2 (double x, int& exp);
105extern OCTAVE_API float log2 (float x, int& exp);
106
107extern OCTAVE_API Complex log2 (const Complex& x, int& exp);
108extern OCTAVE_API FloatComplex log2 (const FloatComplex& x, int& exp);
109
110inline double exp2 (double x) { return std::exp2 (x); }
111inline float exp2 (float x) { return std::exp2f (x); }
112
113template <typename T>
114std::complex<T>
115ceil (const std::complex<T>& x)
116{
117 return std::complex<T> (std::ceil (std::real (x)),
118 std::ceil (std::imag (x)));
119}
120
121template <typename T>
122std::complex<T>
123trunc (const std::complex<T>& x)
124{
125 return std::complex<T> (std::trunc (std::real (x)),
126 std::trunc (std::imag (x)));
127}
128
129// Provide alias for trunc under the more familiar name of fix.
130inline double fix (double x) { return std::trunc (x); }
131inline float fix (float x) { return std::trunc (x); }
132
133template <typename T>
134std::complex<T>
135fix (const std::complex<T>& x)
136{
137 return trunc (x);
138}
139
140template <typename T>
141std::complex<T>
142floor (const std::complex<T>& x)
143{
144 return std::complex<T> (std::floor (std::real (x)),
145 std::floor (std::imag (x)));
146}
147
148inline double round (double x) { return std::round (x); }
149inline float round (float x) { return std::roundf (x); }
150
151template <typename T>
152std::complex<T>
153round (const std::complex<T>& x)
154{
155 return std::complex<T> (round (std::real (x)), round (std::imag (x)));
156}
157
158inline double
159roundb (double x)
160{
161 double t = round (x);
162
163 if (fabs (x - t) == 0.5)
164 t = 2 * std::trunc (0.5 * t);
165
166 return t;
167}
168
169inline float
170roundb (float x)
171{
172 float t = round (x);
173
174 if (fabsf (x - t) == 0.5f)
175 t = 2 * std::trunc (0.5f * t);
176
177 return t;
178}
179
180template <typename T>
181std::complex<T>
182roundb (const std::complex<T>& x)
183{
184 return std::complex<T> (roundb (std::real (x)), roundb (std::imag (x)));
185}
186
187extern OCTAVE_API double frexp (double x, int *expptr);
188extern OCTAVE_API float frexp (float x, int *expptr);
189
190// Functions testing for NaN, Inf, and finite elements
191
192inline bool isnan (bool) { return false; }
193inline bool isnan (char) { return false; }
194
195inline bool isnan (double x) { return std::isnan (x); }
196inline bool isnan (float x) { return std::isnan (x); }
197
198template <typename T>
199bool
201{
202 return false;
203}
204
205template <typename T>
206bool
207isnan (const std::complex<T>& x)
208{
209 return (std::isnan (std::real (x)) || std::isnan (std::imag (x)));
210}
211
212inline bool isinf (double x) { return std::isinf (x); }
213inline bool isinf (float x) { return std::isinf (x); }
214
215template <typename T>
216bool
218{
219 return false;
220}
221
222template <typename T>
223bool
224isinf (const std::complex<T>& x)
225{
226 return (std::isinf (std::real (x)) || std::isinf (std::imag (x)));
227}
228
229inline bool isfinite (double x) { return std::isfinite (x); }
230inline bool isfinite (float x) { return std::isfinite (x); }
231
232template <typename T>
233bool
234isfinite (const std::complex<T>& x)
235{
236 return (isfinite (std::real (x)) && isfinite (std::imag (x)));
237}
238
239// Some useful tests, that are commonly repeated.
240// Test for a finite integer.
241
242// A large benchmark of std::round vs std::trunc showed that trunc was some
243// 3 times faster than round, taking some 1.4 nanoseconds for trunc and
244// some 4.1 nanoseconds for round.
245inline bool is_integer (double x) { return isfinite (x) && x == std::trunc (x); }
246inline bool is_integer (float x) { return isfinite (x) && x == std::trunc (x); }
247
248OCTAVE_DEPRECATED (11, "use octave::math::is_integer instead")
249inline bool isinteger (double x) { return is_integer (x); }
250
251OCTAVE_DEPRECATED (11, "use octave::math::is_integer instead")
252inline bool isinteger (float x) { return is_integer (x); }
253
254inline double
255signum (double x)
256{
257 double tmp = 0.0;
258
259 if (x < 0.0)
260 tmp = -1.0;
261 else if (x > 0.0)
262 tmp = 1.0;
263
264 return isnan (x) ? numeric_limits<double>::NaN () : tmp;
265}
266
267inline float
268signum (float x)
269{
270 float tmp = 0.0f;
271
272 if (x < 0.0f)
273 tmp = -1.0f;
274 else if (x > 0.0f)
275 tmp = 1.0f;
276
277 return isnan (x) ? numeric_limits<float>::NaN () : tmp;
278}
279
280template <typename T>
281std::complex<T>
282signum (const std::complex<T>& x)
283{
284 T tmp = std::abs (x);
285
286 return tmp == 0 ? 0.0 : x / tmp;
287}
288
289// FIXME: Deprecated in Octave 11. Remove in Octave 13.
290// Convert X to the nearest integer value. Should not pass NaN to
291// this function.
292
293// For integer types? Hmm. Need to be sure T is an integer type...
294template <typename T>
295OCTAVE_DEPRECATED (11, "use octave::math::round instead")
296T
298{
299 return x;
300}
301
302template <>
303OCTAVE_DEPRECATED (11, "use octave::math::round instead")
304inline double x_nint (double x)
305{
306 return round (x);
307}
308
309template <>
310OCTAVE_DEPRECATED (11, "use octave::math::round instead")
311inline float x_nint (float x)
312{
313 return round (x);
314}
315
316extern OCTAVE_API octave_idx_type nint_big (double x);
317extern OCTAVE_API octave_idx_type nint_big (float x);
318
319extern OCTAVE_API int nint (double x);
320extern OCTAVE_API int nint (float x);
321
322template <typename T>
323T
324mod (T x, T y)
325{
326 T retval;
327
328 if (y == 0)
329 retval = x;
330 else
331 {
332 T q = x / y;
333
334 if (round (y) != y
335 && (std::abs ((q - round (q)) / round (q))
336 < std::numeric_limits<T>::epsilon ()))
337 retval = 0;
338 else
339 {
340 T n = std::floor (q);
341
342 // Prevent use of extra precision.
343 T tmp = y * n;
344
345 retval = x - tmp;
346 }
347 }
348
349 if (x != y && y != 0)
350 retval = copysign (retval, y);
351
352 return retval;
353}
354
355template <typename T>
356T
357rem (T x, T y)
358{
359 T retval;
360
361 if (y == 0)
362 retval = numeric_limits<T>::NaN ();
363 else
364 {
365 T q = x / y;
366
367 if (round (y) != y
368 && (std::abs ((q - round (q)) / round (q))
369 < std::numeric_limits<T>::epsilon ()))
370 retval = 0;
371 else
372 {
373 T n = std::trunc (q);
374
375 // Prevent use of extra precision.
376 T tmp = y * n;
377
378 retval = x - tmp;
379 }
380 }
381
382 if (x != y && y != 0)
383 retval = copysign (retval, x);
384
385 return retval;
386}
387
388// Generic min, max definitions
389template <typename T>
390T
391min (T x, T y)
392{
393 return x <= y ? x : y;
394}
395
396template <typename T>
397T
398max (T x, T y)
399{
400 return x >= y ? x : y;
401}
402
403// This form is favorable. GCC will translate (x <= y ? x : y) without a
404// jump, hence the only conditional jump involved will be the first
405// (isnan), infrequent and hence friendly to branch prediction.
406
407inline char
408min (char x, char y)
409{
410 return x <= y ? x : y;
411}
412
413inline char
414max (char x, char y)
415{
416 return x >= y ? x : y;
417}
418
419inline double
420min (double x, double y)
421{
422 return isnan (y) ? x : (x <= y ? x : y);
423}
424
425inline double
426max (double x, double y)
427{
428 return isnan (y) ? x : (x >= y ? x : y);
429}
430
431inline double
432min (double x, double y, const bool nanflag)
433{
434 double out;
435 if (! nanflag && (isnan (x) || isnan (y)))
436 out = NAN;
437 else
438 out = isnan (y) ? x : (x <= y ? x : y);
439 return out;
440}
441
442inline double
443max (double x, double y, const bool nanflag)
444{
445 double out;
446 if (! nanflag && (isnan (x) || isnan (y)))
447 out = NAN;
448 else
449 out = isnan (y) ? x : (x >= y ? x : y);
450 return out;
451}
452
453inline double
454min (double x, double y, const bool nanflag, const bool realabs)
455{
456 double out;
457 if (! nanflag && (isnan (x) || isnan (y)))
458 out = NAN;
459 else if (realabs)
460 out = isnan (y) ? x : (x <= y ? x : y);
461 else
462 out = isnan (y) ? x :
463 (std::abs (x) < std::abs (y) ? x : (std::abs (x) == std::abs (y) && x <= y ? x : y));
464 return out;
465}
466
467inline double
468max (double x, double y, const bool nanflag, const bool realabs)
469{
470 double out;
471 if (! nanflag && (isnan (x) || isnan (y)))
472 out = NAN;
473 else if (realabs)
474 out = isnan (y) ? x : (x >= y ? x : y);
475 else
476 out = isnan (y) ? x :
477 (std::abs (x) > std::abs (y) ? x : (std::abs (x) == std::abs (y) && x >= y ? x : y));
478 return out;
479}
480
481inline float
482min (float x, float y)
483{
484 return isnan (y) ? x : (x <= y ? x : y);
485}
486
487inline float
488max (float x, float y)
489{
490 return isnan (y) ? x : (x >= y ? x : y);
491}
492
493inline float
494min (float x, float y, const bool nanflag)
495{
496 float out;
497 if (! nanflag && (isnan (x) || isnan (y)))
498 out = NAN;
499 else
500 out = isnan (y) ? x : (x <= y ? x : y);
501 return out;
502}
503
504inline float
505max (float x, float y, const bool nanflag)
506{
507 float out;
508 if (! nanflag && (isnan (x) || isnan (y)))
509 out = NAN;
510 else
511 out = isnan (y) ? x : (x >= y ? x : y);
512 return out;
513}
514
515inline float
516min (float x, float y, const bool nanflag, const bool realabs)
517{
518 float out;
519 if (! nanflag && (isnan (x) || isnan (y)))
520 out = NAN;
521 else if (realabs)
522 out = isnan (y) ? x : (x <= y ? x : y);
523 else
524 out = isnan (y) ? x :
525 (std::abs (x) < std::abs (y) ? x :
526 (std::abs (x) == std::abs (y) && x <= y ? x : y));
527 return out;
528}
529
530inline float
531max (float x, float y, const bool nanflag, const bool realabs)
532{
533 float out;
534 if (! nanflag && (isnan (x) || isnan (y)))
535 out = NAN;
536 else if (realabs)
537 out = isnan (y) ? x : (x >= y ? x : y);
538 else
539 out = isnan (y) ? x :
540 (std::abs (x) > std::abs (y) ? x :
541 (std::abs (x) == std::abs (y) && x >= y ? x : y));
542 return out;
543}
544
545inline std::complex<double>
546min (const std::complex<double>& x, const std::complex<double>& y)
547{
548 return isnan (y) ? x : (std::abs (x) < std::abs (y) ? x :
549 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
550}
551
552inline std::complex<double>
553max (const std::complex<double>& x, const std::complex<double>& y)
554{
555 return isnan (y) ? x : (std::abs (x) > std::abs (y) ? x :
556 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
557}
558
559inline std::complex<double>
560min (const std::complex<double>& x, const std::complex<double>& y,
561 const bool nanflag)
562{
563 std::complex<double> out;
564 if (! nanflag && (isnan (x) || isnan (y)))
565 out = NAN;
566 else
567 out = isnan (y) ? x : (std::abs (x) < std::abs (y) ? x :
568 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
569 return out;
570}
571
572inline std::complex<double>
573max (const std::complex<double>& x, const std::complex<double>& y,
574 const bool nanflag)
575{
576 std::complex<double> out;
577 if (! nanflag && (isnan (x) || isnan (y)))
578 out = NAN;
579 else
580 out = isnan (y) ? x : (std::abs (x) > std::abs (y) ? x :
581 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
582 return out;
583}
584
585inline std::complex<double>
586min (const std::complex<double>& x, const std::complex<double>& y,
587 const bool nanflag, const bool realabs)
588{
589 std::complex<double> out;
590 if (! nanflag && (isnan (x) || isnan (y)))
591 out = NAN;
592 else if (realabs)
593 out = isnan (y) ? x : (std::real (x) < std::real (y) ? x :
594 (std::real (x) == std::real (y) &&
595 std::imag (x) <= std::imag (y) ? x : y));
596 else
597 out = isnan (y) ? x : (std::abs (x) < std::abs (y) ? x :
598 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
599 return out;
600}
601
602inline std::complex<double>
603max (const std::complex<double>& x, const std::complex<double>& y,
604 const bool nanflag, const bool realabs)
605{
606 std::complex<double> out;
607 if (! nanflag && (isnan (x) || isnan (y)))
608 out = NAN;
609 else if (realabs)
610 out = isnan (y) ? x : (std::real (x) > std::real (y) ? x :
611 (std::real (x) == std::real (y) &&
612 std::imag (x) >= std::imag (y) ? x : y));
613 else
614 out = isnan (y) ? x : (std::abs (x) > std::abs (y) ? x :
615 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
616 return out;
617}
618
619inline std::complex<float>
620min (const std::complex<float>& x, const std::complex<float>& y)
621{
622 return isnan (y) ? x : (abs (x) < abs (y) ? x :
623 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
624}
625
626inline std::complex<float>
627max (const std::complex<float>& x, const std::complex<float>& y)
628{
629 return isnan (y) ? x : (abs (x) > abs (y) ? x :
630 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
631}
632
633inline std::complex<float>
634min (const std::complex<float>& x, const std::complex<float>& y,
635 const bool nanflag)
636{
637 std::complex<float> out;
638 if (! nanflag && (isnan (x) || isnan (y)))
639 out = NAN;
640 else
641 out = isnan (y) ? x : (std::abs (x) < std::abs (y) ? x :
642 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
643 return out;
644}
645
646inline std::complex<float>
647max (const std::complex<float>& x, const std::complex<float>& y,
648 const bool nanflag)
649{
650 std::complex<float> out;
651 if (! nanflag && (isnan (x) || isnan (y)))
652 out = NAN;
653 else
654 out = isnan (y) ? x : (std::abs (x) > std::abs (y) ? x :
655 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
656 return out;
657}
658
659inline std::complex<float>
660min (const std::complex<float>& x, const std::complex<float>& y,
661 const bool nanflag, const bool realabs)
662{
663 std::complex<float> out;
664 if (! nanflag && (isnan (x) || isnan (y)))
665 out = NAN;
666 else if (realabs)
667 out = isnan (y) ? x : (std::real (x) < std::real (y) ? x :
668 (std::real (x) == std::real (y) &&
669 std::imag (x) <= std::imag (y) ? x : y));
670 else
671 out = isnan (y) ? x : (std::abs (x) < std::abs (y) ? x :
672 (std::abs (x) == std::abs (y) && std::arg (x) <= std::arg (y) ? x : y));
673 return out;
674}
675
676inline std::complex<float>
677max (const std::complex<float>& x, const std::complex<float>& y,
678 const bool nanflag, const bool realabs)
679{
680 std::complex<float> out;
681 if (! nanflag && (isnan (x) || isnan (y)))
682 out = NAN;
683 else if (realabs)
684 out = isnan (y) ? x : (std::real (x) > std::real (y) ? x :
685 (std::real (x) == std::real (y) &&
686 std::imag (x) >= std::imag (y) ? x : y));
687 else
688 out = isnan (y) ? x : (std::abs (x) > std::abs (y) ? x :
689 (std::abs (x) == std::abs (y) && std::arg (x) >= std::arg (y) ? x : y));
690 return out;
691}
692
693template <typename T>
694inline octave_int<T>
696{
697 return x.value () <= y.value () ? x : y;
698}
699
700template <typename T>
701inline octave_int<T>
703{
704 return x.value () >= y.value () ? x : y;
705}
706
707template <typename T>
708inline octave_int<T>
710 [[maybe_unused]] const bool nanflag)
711{
712 return x.value () <= y.value () ? x : y;
713}
714
715template <typename T>
716inline octave_int<T>
718 [[maybe_unused]] const bool nanflag)
719{
720 return x.value () >= y.value () ? x : y;
721}
722
723template <typename T>
724inline octave_int<T>
726 [[maybe_unused]] const bool nanflag, const bool realabs)
727{
728 octave_int<T> out;
729 if (realabs)
730 out = x.value () <= y.value () ? x : y;
731 else
732 out = mappers_abs (x) < mappers_abs (y) ? x :
733 (mappers_abs (x) == mappers_abs (y) &&
734 x.value () <= y.value () ? x : y);
735 return out;
736}
737
738template <typename T>
739inline octave_int<T>
741 [[maybe_unused]] const bool nanflag, const bool realabs)
742{
743 octave_int<T> out;
744 if (realabs)
745 out = x.value () >= y.value () ? x : y;
746 else
747 out = mappers_abs (x) > mappers_abs (y) ? x :
748 (mappers_abs (x) == mappers_abs (y) &&
749 x.value () >= y.value () ? x : y);
750 return out;
751}
752
753// These map reals to Complex.
754
755extern OCTAVE_API Complex rc_acos (double);
756extern OCTAVE_API FloatComplex rc_acos (float);
757
758extern OCTAVE_API Complex rc_acosh (double);
759extern OCTAVE_API FloatComplex rc_acosh (float);
760
761extern OCTAVE_API Complex rc_asin (double);
762extern OCTAVE_API FloatComplex rc_asin (float);
763
764extern OCTAVE_API Complex rc_atanh (double);
765extern OCTAVE_API FloatComplex rc_atanh (float);
766
767extern OCTAVE_API Complex rc_log (double);
768extern OCTAVE_API FloatComplex rc_log (float);
769
770extern OCTAVE_API Complex rc_log2 (double);
771extern OCTAVE_API FloatComplex rc_log2 (float);
772
773extern OCTAVE_API Complex rc_log10 (double);
774extern OCTAVE_API FloatComplex rc_log10 (float);
775
776extern OCTAVE_API Complex rc_sqrt (double);
777extern OCTAVE_API FloatComplex rc_sqrt (float);
778
779OCTAVE_END_NAMESPACE(math)
780OCTAVE_END_NAMESPACE(octave)
781
782#endif
T value() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition main.in.cc:55
std::complex< T > ceil(const std::complex< T > &x)
Definition mappers.h:115
Complex atan(const Complex &x)
Definition mappers.h:83
bool is_NaN_or_NA(const Complex &x)
Definition mappers.cc:70
double roundb(double x)
Definition mappers.h:159
std::complex< T > floor(const std::complex< T > &x)
Definition mappers.h:142
bool isfinite(double x)
Definition mappers.h:229
bool isinteger(double x)
Definition mappers.h:249
double log2(double x)
Definition mappers.h:98
T max(T x, T y)
Definition mappers.h:398
Complex rc_acosh(double)
Definition mappers.cc:253
bool isinf(double x)
Definition mappers.h:212
double signbit(double x)
Definition mappers.h:66
T mod(T x, T y)
Definition mappers.h:324
Complex asin(const Complex &x)
Definition mappers.cc:106
Complex rc_asin(double)
Definition mappers.cc:265
Complex rc_log2(double)
Definition mappers.cc:304
bool positive_sign(double x)
Definition mappers.h:74
octave_idx_type nint_big(double x)
Definition mappers.cc:187
Complex rc_log10(double)
Definition mappers.cc:319
Complex rc_sqrt(double)
Definition mappers.cc:334
T rem(T x, T y)
Definition mappers.h:357
int nint(double x)
Definition mappers.cc:215
double signum(double x)
Definition mappers.h:255
double round(double x)
Definition mappers.h:148
Complex rc_log(double)
Definition mappers.cc:291
double exp2(double x)
Definition mappers.h:110
bool negative_sign(double x)
Definition mappers.cc:180
auto mappers_abs(const octave_int< T > &x)
Definition mappers.h:43
bool isnan(bool)
Definition mappers.h:192
bool isna(double x)
Definition mappers.cc:46
Complex rc_acos(double)
Definition mappers.cc:240
Complex rc_atanh(double)
Definition mappers.cc:278
double conj(double x)
Definition mappers.h:88
double copysign(double x, double y)
Definition mappers.h:63
T min(T x, T y)
Definition mappers.h:391
double fix(double x)
Definition mappers.h:130
Complex acos(const Complex &x)
Definition mappers.cc:84
std::complex< T > trunc(const std::complex< T > &x)
Definition mappers.h:123
bool is_integer(double x)
Definition mappers.h:245
T x_nint(T x)
Definition mappers.h:297
double frexp(double x, int *expptr)
Definition mappers.cc:128
OCTAVE_DEPRECATED(11, "") typedef bool(*b_d_Mapper)(double)
std::complex< double > Complex
Definition oct-cmplx.h:33
std::complex< float > FloatComplex
Definition oct-cmplx.h:34
template int8_t abs(int8_t)
F77_RET_T const F77_DBLE * x