GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ov-int64.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2004-2015 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26 
27 #include <iostream>
28 #include <limits>
29 
30 #include "lo-ieee.h"
31 #include "lo-utils.h"
32 #include "mx-base.h"
33 #include "quit.h"
34 
35 #include "defun.h"
36 #include "gripes.h"
37 #include "oct-obj.h"
38 #include "oct-lvalue.h"
39 #include "oct-hdf5.h"
40 #include "ops.h"
41 #include "ov-base.h"
42 
43 #include "ov-base-int.h"
44 #include "ov-base-int.cc"
45 #include "ov-int64.h"
46 #include "ov-type-conv.h"
47 #include "pr-output.h"
48 #include "variables.h"
49 
50 #include "byte-swap.h"
51 #include "ls-oct-ascii.h"
52 #include "ls-utils.h"
53 #include "ls-hdf5.h"
54 
56 
58 
59 
60 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_matrix,
61  "int64 matrix", "int64");
62 
64 
66 
67 
68 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_scalar,
69  "int64 scalar", "int64");
70 
71 DEFUN (int64, args, ,
72  "-*- texinfo -*-\n\
73 @deftypefn {Built-in Function} {} int64 (@var{x})\n\
74 Convert @var{x} to 64-bit integer type.\n\
75 @seealso{int8, uint8, int16, uint16, int32, uint32, uint64}\n\
76 @end deftypefn")
77 {
78  OCTAVE_TYPE_CONV_BODY (int64);
79 }
80 
81 /*
82 %!assert (class (int64 (1)), "int64")
83 %!assert (int64 (1.25), int64 (1))
84 %!assert (int64 (1.5), int64 (2))
85 %!assert (int64 (-1.5), int64 (-2))
86 %!assert (int64 (2^65), int64 (2^64-1))
87 %!assert (int64 (-2^65), int64 (-2^64))
88 */
#define OCTAVE_TYPE_CONV_BODY(NAME)
Definition: ov-type-conv.h:106
#define DEFUN(name, args_name, nargout_name, doc)
Definition: defun.h:44
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
Definition: ov-base.h:164