comparison libinterp/octave-value/module.mk @ 28588:ee9b1081471f

allow integer constants > flintmax to be represented exactly (bug #45945) * ov-magic-int.h, ov-magic-int.cc: New files to provide "magic" integer data type that can store integer constants larger than flintmax but that behaves like a double constant in nearly all cases. The primary exception is when the value is processed by the int64 and uint64 functions. * libinterp/octave-value/module.mk: Update. * op-mi.cc: New file. Provide unary + and - operators for magic integers so that explicit positive or negative magic integers will work as expected. * libinterp/operators/module.mk: Update. * ov-base.h (octave_base_value::is_magic_int): New virtual function. * ov.h, ov.cc (octave_value::is_magic_int): New function. (octave_value::storable_value, octave_value::make_storable_value): Also handle magic integer values. (octave_value::install_types): Install octave_magic_int and octave_magic_uint types. * lex.ll (flintmax): New static function. (base_lexer::handle_number<10>): Create magic integers from constants that contain only digits and have values in the range flintmax to std::numeric_limits<uint64_t>::max(). * pt-eval.cc (tree_evaluator::bind_ans): Display stored value.
author John W. Eaton <jwe@octave.org>
date Mon, 20 Jul 2020 17:43:16 -0400
parents 7a8c69c4eb55
children e26201931ea3
comparison
equal deleted inserted replaced
28587:6310bb807752 28588:ee9b1081471f
50 %reldir%/ov-flt-cx-mat.h \ 50 %reldir%/ov-flt-cx-mat.h \
51 %reldir%/ov-flt-re-diag.h \ 51 %reldir%/ov-flt-re-diag.h \
52 %reldir%/ov-flt-re-mat.h \ 52 %reldir%/ov-flt-re-mat.h \
53 %reldir%/ov-java.h \ 53 %reldir%/ov-java.h \
54 %reldir%/ov-lazy-idx.h \ 54 %reldir%/ov-lazy-idx.h \
55 %reldir%/ov-magic-int.h \
55 %reldir%/ov-mex-fcn.h \ 56 %reldir%/ov-mex-fcn.h \
56 %reldir%/ov-null-mat.h \ 57 %reldir%/ov-null-mat.h \
57 %reldir%/ov-oncleanup.h \ 58 %reldir%/ov-oncleanup.h \
58 %reldir%/ov-perm.h \ 59 %reldir%/ov-perm.h \
59 %reldir%/ov-range.h \ 60 %reldir%/ov-range.h \
114 %reldir%/ov-flt-cx-mat.cc \ 115 %reldir%/ov-flt-cx-mat.cc \
115 %reldir%/ov-flt-re-diag.cc \ 116 %reldir%/ov-flt-re-diag.cc \
116 %reldir%/ov-flt-re-mat.cc \ 117 %reldir%/ov-flt-re-mat.cc \
117 %reldir%/ov-java.cc \ 118 %reldir%/ov-java.cc \
118 %reldir%/ov-lazy-idx.cc \ 119 %reldir%/ov-lazy-idx.cc \
120 %reldir%/ov-magic-int.cc \
119 %reldir%/ov-mex-fcn.cc \ 121 %reldir%/ov-mex-fcn.cc \
120 %reldir%/ov-null-mat.cc \ 122 %reldir%/ov-null-mat.cc \
121 %reldir%/ov-oncleanup.cc \ 123 %reldir%/ov-oncleanup.cc \
122 %reldir%/ov-perm.cc \ 124 %reldir%/ov-perm.cc \
123 %reldir%/ov-range.cc \ 125 %reldir%/ov-range.cc \