Gretl User's Guide

Total Page:16

File Type:pdf, Size:1020Kb

Gretl User's Guide Gretl User’s Guide Gnu Regression, Econometrics and Time-series Library Allin Cottrell Department of Economics Wake Forest University Riccardo “Jack” Lucchetti Dipartimento di Economia Università Politecnica delle Marche August, 2021 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). Contents 1 Introduction 1 1.1 Features at a glance.........................................1 1.2 Acknowledgements.........................................1 1.3 Installing the programs.......................................2 I Running the program3 2 Getting started 4 2.1 Let’s run a regression........................................4 2.2 Estimation output..........................................6 2.3 The main window menus......................................7 2.4 Keyboard shortcuts......................................... 10 2.5 The gretl toolbar........................................... 10 3 Modes of working 12 3.1 Command scripts........................................... 12 3.2 Saving script objects......................................... 14 3.3 The gretl console........................................... 14 3.4 The Session concept......................................... 15 4 Data files 18 4.1 Data file formats........................................... 18 4.2 Databases............................................... 18 4.3 Creating a dataset from scratch.................................. 19 4.4 Structuring a dataset......................................... 21 4.5 Panel data specifics......................................... 23 4.6 Missing data values......................................... 27 4.7 Maximum size of data sets..................................... 28 4.8 Data file collections......................................... 28 4.9 Assembling data from multiple sources............................. 30 5 Sub-sampling a dataset 31 5.1 Introduction.............................................. 31 5.2 Setting the sample.......................................... 31 5.3 Restricting the sample........................................ 32 i Contents ii 5.4 Panel data............................................... 33 5.5 Resampling and bootstrapping.................................. 34 6 Graphs and plots 36 6.1 Gnuplot graphs............................................ 36 6.2 Plotting graphs from scripts.................................... 40 6.3 Boxplots................................................ 44 7 Joining data sources 47 7.1 Introduction.............................................. 47 7.2 Basic syntax.............................................. 47 7.3 Filtering................................................. 48 7.4 Matching with keys.......................................... 49 7.5 Aggregation.............................................. 52 7.6 String-valued key variables..................................... 52 7.7 Importing multiple series...................................... 53 7.8 A real-world case........................................... 54 7.9 The representation of dates.................................... 56 7.10 Time-series data........................................... 57 7.11 Special handling of time columns................................. 60 7.12 Panel data............................................... 60 7.13 Memo: join options......................................... 62 8 Realtime data 65 8.1 Introduction.............................................. 65 8.2 Atomic format for realtime data................................. 65 8.3 More on time-related options................................... 67 8.4 Getting a certain data vintage................................... 67 8.5 Getting the n-th release for each observation period..................... 68 8.6 Getting the values at a fixed lag after the observation period................ 69 8.7 Getting the revision history for an observation........................ 70 9 Temporal disaggregation 73 9.1 Introduction.............................................. 73 9.2 Notation and design......................................... 74 9.3 Overview of data handling..................................... 75 9.4 Function signature.......................................... 75 9.5 Handling of deterministic terms.................................. 77 9.6 Some technical details........................................ 77 9.7 The plot option............................................ 79 9.8 Multiple low-frequency series................................... 79 Contents iii 9.9 Examples................................................ 80 10 Special functions in genr 81 10.1 Introduction.............................................. 81 10.2 Cumulative densities and p-values................................ 82 10.3 Retrieving internal variables (dollar accessors)......................... 83 11 Gretl data types 84 11.1 Introduction.............................................. 84 11.2 Series.................................................. 84 11.3 Scalars................................................. 85 11.4 Matrices................................................. 85 11.5 Lists................................................... 85 11.6 Strings................................................. 85 11.7 Bundles................................................. 86 11.8 Arrays.................................................. 90 11.9 The life cycle of gretl objects.................................... 93 12 Discrete variables 96 12.1 Declaring variables as discrete................................... 96 12.2 Commands for discrete variables................................. 97 13 Loop constructs 101 13.1 Introduction.............................................. 101 13.2 Loop control variants........................................ 101 13.3 Progressive mode........................................... 104 13.4 Loop examples............................................ 104 14 User-defined functions 108 14.1 Defining a function.......................................... 108 14.2 Calling a function........................................... 111 14.3 Deleting a function.......................................... 111 14.4 Function programming details................................... 112 14.5 Function packages.......................................... 119 15 Named lists and strings 120 15.1 Named lists.............................................. 120 15.2 Named strings............................................. 125 16 String-valued series 129 16.1 Introduction.............................................. 129 16.2 Creating a string-valued series................................... 129 Contents iv 16.3 Permitted operations........................................ 131 16.4 String-valued series and functions................................ 133 16.5 Other import formats........................................ 134 17 Matrix manipulation 136 17.1 Creating matrices........................................... 136 17.2 Empty matrices............................................ 137 17.3 Selecting submatrices........................................ 138 17.4 Deleting rows or columns...................................... 139 17.5 Matrix operators........................................... 140 17.6 Matrix–scalar operators....................................... 142 17.7 Matrix functions........................................... 142 17.8 Matrix accessors........................................... 148 17.9 Namespace issues.......................................... 149 17.10Creating a data series from a matrix............................... 149 17.11Matrices and lists........................................... 149 17.12Deleting a matrix........................................... 150 17.13Printing a matrix........................................... 151 17.14Example: OLS using matrices.................................... 151 18 Complex matrices 153 18.1 Introduction.............................................. 153 18.2 Creating a complex matrix..................................... 153 18.3 Indexation............................................... 154 18.4 Operators................................................ 155 18.5 Functions................................................ 155 18.6 File input/output........................................... 156 18.7 Backward compatibility....................................... 156 19 Calendar dates 160 19.1 Introduction.............................................. 160 19.2 Calendrical functions........................................ 160 19.3 Working with pre-Gregorian dates................................ 163 19.4 Year numbering............................................ 164 20 Handling mixed-frequency data 165 20.1 Basics.................................................. 165 20.2 The notion of a “MIDAS list”.................................... 167 20.3 High-frequency lag lists....................................... 168 20.4 High-frequency first differences.................................. 170 20.5 MIDAS-related plots......................................... 170 Contents v 20.6 Alternative MIDAS data methods................................. 170 21 Cheat sheet 176 21.1 Dataset handling........................................... 176 21.2 Creating/modifying variables................................... 180 21.3 Neat tricks............................................... 187 II Econometric methods 192 22 Robust
Recommended publications
  • Seminar to Advanced Macroeconomics
    Seminar to Advanced Macroeconomics Jaromír Baxa IES FSV UK, WS 2010/2011 Introduction Aim of the seminar: Overview over empirical methods used in macro to make your horizons wider. Easy applications of econometrics to macroeconomic topics discussed in the lectures Using econometric software Talking about your Project Tasks and discussion about Problem Sets Why Empirical Seminar? The Role of Empirical Work in Macro Correspondence between the theory and real data Forecasting and economic policy Finding empirical evidence to build new theories Fundamental ucertainty in econometrics: choice of variables => Robustness over different datasets, over different additional variables... => We should always keep in mind this uncertainty and ask: Are my results good because of the datasets? Methods Descriptive statistics, tests... Some nonparametric methods: tests, density estimates Linear Regression Panel data regression Principal Components method Time series: seasonal adjustment, trends... Dynamic models (very brief introduction) ... Software You can't do empirical work without it. There are many software packages for econometrics: Commercial: TSP, SAS, Stata, E-views, PC-Give, Gauss, S-Plus and many others Freeware/Open Source/Shareware without limitations: Gretl, R-Project, Ox See http://freestatistics.altervista.org/stat.php for comprehensive list. Use whatever you want to And bring your laptop with (if you can) Gretl Available in Room 016: TSP (GiweWin GUI), SPSS for Windows 10.0, R (with necessary libraries), Gretl, JMulti Gretl: http://gretl.sourceforge.net, GNU GPL licence, crossplatform. Have a look into documentation: manual as an textbook available. Don't forget to install seasonal adjustment methods, we will use them in a couple of weeks.
    [Show full text]
  • Introduction to IDL®
    Introduction to IDL® Revised for Print March, 2016 ©2016 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation. All rights reserved. ENVI and IDL are registered trademarks of Harris Corporation. All other marks are the property of their respective owners. This document is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Contents 1 Introduction To IDL 5 1.1 Introduction . .5 1.1.1 What is ENVI? . .5 1.1.2 ENVI + IDL, ENVI, and IDL . .6 1.1.3 ENVI Resources . .6 1.1.4 Contacting Harris Geospatial Solutions . .6 1.1.5 Tutorials . .6 1.1.6 Training . .7 1.1.7 ENVI Support . .7 1.1.8 Contacting Technical Support . .7 1.1.9 Website . .7 1.1.10 IDL Newsgroup . .7 2 About This Course 9 2.1 Manual Organization . .9 2.1.1 Programming Style . .9 2.2 The Course Files . 11 2.2.1 Installing the Course Files . 11 2.3 Starting IDL . 11 2.3.1 Windows . 11 2.3.2 Max OS X . 11 2.3.3 Linux . 12 3 A Tour of IDL 13 3.1 Overview . 13 3.2 Scalars and Arrays . 13 3.3 Reading Data from Files . 15 3.4 Line Plots . 15 3.5 Surface Plots . 17 3.6 Contour Plots . 18 3.7 Displaying Images . 19 3.8 Exercises . 21 3.9 References . 21 4 IDL Basics 23 4.1 IDL Directory Structure . 23 4.2 The IDL Workbench . 24 4.3 Exploring the IDL Workbench .
    [Show full text]
  • A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya 1 Introduction
    A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya Sai K. Popuri and Matthias K. Gobbert* Department of Mathematics and Statistics, University of Maryland, Baltimore County *Corresponding author: [email protected], www.umbc.edu/~gobbert Technical Report HPCF{2017{3, hpcf.umbc.edu > Publications Abstract Matlab is the most popular commercial package for numerical computations in mathematics, statistics, the sciences, engineering, and other fields. Octave is a freely available software used for numerical computing. R is a popular open source freely available software often used for statistical analysis and computing. Julia is a recent open source freely available high-level programming language with a sophisticated com- piler for high-performance numerical and statistical computing. They are all available to download on the Linux, Windows, and Mac OS X operating systems. We investigate whether the three freely available software are viable alternatives to Matlab for uses in research and teaching. We compare the results on part of the equipment of the cluster maya in the UMBC High Performance Computing Facility. The equipment has 72 nodes, each with two Intel E5-2650v2 Ivy Bridge (2.6 GHz, 20 MB cache) proces- sors with 8 cores per CPU, for a total of 16 cores per node. All nodes have 64 GB of main memory and are connected by a quad-data rate InfiniBand interconnect. The tests focused on usability lead us to conclude that Octave is the most compatible with Matlab, since it uses the same syntax and has the native capability of running m-files. R was hampered by somewhat different syntax or function names and some missing functions.
    [Show full text]
  • Python – an Introduction
    Python { AN IntroduCtion . default parameters . self documenting code Example for extensions: Gnuplot Hans Fangohr, [email protected], CED Seminar 05/02/2004 ² The wc program in Python ² Summary Overview ² Outlook ² Why Python ² Literature: How to get started ² Interactive Python (IPython) ² M. Lutz & D. Ascher: Learning Python Installing extra modules ² ² ISBN: 1565924649 (1999) (new edition 2004, ISBN: Lists ² 0596002815). We point to this book (1999) where For-loops appropriate: Chapter 1 in LP ² ! if-then ² modules and name spaces Alex Martelli: Python in a Nutshell ² ² while ISBN: 0596001886 ² string handling ² ¯le-input, output Deitel & Deitel et al: Python { How to Program ² ² functions ISBN: 0130923613 ² Numerical computation ² some other features Other resources: ² . long numbers www.python.org provides extensive . exceptions ² documentation, tools and download. dictionaries Python { an introduction 1 Python { an introduction 2 Why Python? How to get started: The interpreter and how to run code Chapter 1, p3 in LP Chapter 1, p12 in LP ! Two options: ! All sorts of reasons ;-) interactive session ² ² . Object-oriented scripting language . start Python interpreter (python.exe, python, . power of high-level language double click on icon, . ) . portable, powerful, free . prompt appears (>>>) . mixable (glue together with C/C++, Fortran, . can enter commands (as on MATLAB prompt) . ) . easy to use (save time developing code) execute program ² . easy to learn . Either start interpreter and pass program name . (in-built complex numbers) as argument: python.exe myfirstprogram.py Today: . ² Or make python-program executable . easy to learn (Unix/Linux): . some interesting features of the language ./myfirstprogram.py . use as tool for small sysadmin/data . Note: python-programs tend to end with .py, processing/collecting tasks but this is not necessary.
    [Show full text]
  • Stan: a Probabilistic Programming Language
    JSS Journal of Statistical Software MMMMMM YYYY, Volume VV, Issue II. http://www.jstatsoft.org/ Stan: A Probabilistic Programming Language Bob Carpenter Andrew Gelman Matt Hoffman Columbia University Columbia University Adobe Research Daniel Lee Ben Goodrich Michael Betancourt Columbia University Columbia University University of Warwick Marcus A. Brubaker Jiqiang Guo Peter Li University of Toronto, NPD Group Columbia University Scarborough Allen Riddell Dartmouth College Abstract Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.2.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the Broyden-Fletcher-Goldfarb-Shanno algorithm. Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propa- gation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible. Stan can be called from the command line, through R using the RStan package, or through Python using the PyStan package. All three interfaces support sampling and optimization-based inference. RStan and PyStan also provide access to log probabilities, gradients, Hessians, and data I/O. Keywords: probabilistic program, Bayesian inference, algorithmic differentiation, Stan.
    [Show full text]
  • Introduction Rats Version 9.0
    RATS VERSION 9.0 INTRODUCTION RATS VERSION 9.0 INTRODUCTION Estima 1560 Sherman Ave., Suite 510 Evanston, IL 60201 Orders, Sales Inquiries 800–822–8038 Web: www.estima.com General Information 847–864–8772 Sales: [email protected] Technical Support 847–864–1910 Technical Support: [email protected] Fax: 847–864–6221 © 2014 by Estima. All Rights Reserved. No part of this book may be reproduced or transmitted in any form or by any means with- out the prior written permission of the copyright holder. Estima 1560 Sherman Ave., Suite 510 Evanston, IL 60201 Published in the United States of America Preface Welcome to Version 9 of rats. We went to a three-book manual set with Version 8 (this Introduction, the User’s Guide and the Reference Manual; and we’ve continued that into Version 9. However, we’ve made some changes in emphasis to reflect the fact that most of our users now use electronic versions of the manuals. And, with well over a thousand example programs, the most common way for people to use rats is to pick an existing program and modify it. With each new major version, we need to decide what’s new and needs to be ex- plained, what’s important and needs greater emphasis, and what’s no longer topical and can be moved out of the main documentation. For Version 9, the chapters in the User’s Guide that received the most attention were “arch/garch and related mod- els” (Chapter 9), “Threshold, Breaks and Switching” (Chapter 11), and “Cross Section and Panel Data” (Chapter 12).
    [Show full text]
  • Econometrics Oxford University, 2017 1 / 34 Introduction
    Do attractive people get paid more? Felix Pretis (Oxford) Econometrics Oxford University, 2017 1 / 34 Introduction Econometrics: Computer Modelling Felix Pretis Programme for Economic Modelling Oxford Martin School, University of Oxford Lecture 1: Introduction to Econometric Software & Cross-Section Analysis Felix Pretis (Oxford) Econometrics Oxford University, 2017 2 / 34 Aim of this Course Aim: Introduce econometric modelling in practice Introduce OxMetrics/PcGive Software By the end of the course: Able to build econometric models Evaluate output and test theories Use OxMetrics/PcGive to load, graph, model, data Felix Pretis (Oxford) Econometrics Oxford University, 2017 3 / 34 Administration Textbooks: no single text book. Useful: Doornik, J.A. and Hendry, D.F. (2013). Empirical Econometric Modelling Using PcGive 14: Volume I, London: Timberlake Consultants Press. Included in OxMetrics installation – “Help” Hendry, D. F. (2015) Introductory Macro-econometrics: A New Approach. Freely available online: http: //www.timberlake.co.uk/macroeconometrics.html Lecture Notes & Lab Material online: http://www.felixpretis.org Problem Set: to be covered in tutorial Exam: Questions possible (Q4 and Q8 from past papers 2016 and 2017) Felix Pretis (Oxford) Econometrics Oxford University, 2017 4 / 34 Structure 1: Intro to Econometric Software & Cross-Section Regression 2: Micro-Econometrics: Limited Indep. Variable 3: Macro-Econometrics: Time Series Felix Pretis (Oxford) Econometrics Oxford University, 2017 5 / 34 Motivation Economies high dimensional, interdependent, heterogeneous, and evolving: comprehensive specification of all events is impossible. Economic Theory likely wrong and incomplete meaningless without empirical support Econometrics to discover new relationships from data Econometrics can provide empirical support. or refutation. Require econometric software unless you really like doing matrix manipulation by hand.
    [Show full text]
  • Econometric Theory
    Econometric Theory John Stachurski January 10, 2014 Contents Preface v I Background Material1 1 Probability2 1.1 Probability Models.............................2 1.2 Distributions................................. 16 1.3 Dependence................................. 25 1.4 Asymptotics................................. 30 1.5 Exercises................................... 39 2 Linear Algebra 49 2.1 Vectors and Matrices............................ 49 2.2 Span, Dimension and Independence................... 59 2.3 Matrices and Equations........................... 66 2.4 Random Vectors and Matrices....................... 71 2.5 Convergence of Random Matrices.................... 74 2.6 Exercises................................... 79 i CONTENTS ii 3 Projections 84 3.1 Orthogonality and Projection....................... 84 3.2 Overdetermined Systems of Equations.................. 90 3.3 Conditioning................................. 93 3.4 Exercises................................... 103 II Foundations of Statistics 107 4 Statistical Learning 108 4.1 Inductive Learning............................. 108 4.2 Statistics................................... 112 4.3 Maximum Likelihood............................ 120 4.4 Parametric vs Nonparametric Estimation................ 125 4.5 Empirical Distributions........................... 134 4.6 Empirical Risk Minimization....................... 137 4.7 Exercises................................... 149 5 Methods of Inference 153 5.1 Making Inference about Theory...................... 153 5.2 Confidence Sets..............................
    [Show full text]
  • Think Before You Ink Disturbing and Morbid and Is Con
    ·Entertainment Here Comes Treble OFWGKTA! By Ian Chandler _By Meg Bell By.Brent Bosworth heme: Ho Ho Hardcore Dean Martin - "Walking In a Win­ Theme: Yuletide cheer "Christmas Eve Sarjevo".- Trans Odd Future .was formed ant to cause your chuckle to re­ ter Wonderland" The day after Thanksgiving, IT be­ ·Siberian Orchestra by Tyler, the Creator, and they re­ emble \l spherical container filled You kids need a shot of old school gins. That is the constant streain .of Ol!e. of the mo!!t popular ~ode lea8ed their first album in 2008. The o the brim with a general gelatin . espresso in your puny little modem Christmas music on all radios: It Christmas songs, you can't have . members that form the group are ubstance? Listen hither, and may lattes. Taste this jazzy version of a seems like you can't escape jt. So Chri'stmas p laylist without this Tyler, the Creator; Earl Sweatshirt; our spirits be roused with the warm winter wonderland, sung by the instead, plug in your headphones "Thank God It's Christmas" Hodgy Beat;, Domo Genesis; Frank trelight of the seasoij. Dino lllmself. May it digest well with and give this mix a try. It's slire to Queen · · Ocean; Mike G; Left Brain; Taco ugust Burns Red"."" "Carol of the you and yours. Fun fact: "The King spread some holiday cheer. Any playlist with Queen is a win Bennett; Jasper Dolphin; Syd tha ells" of Cool" was born in Steubenville, "Baby It's Cold Outside" -Anthony ner, and this adds a bit of gl~m .
    [Show full text]
  • Introduction to GNU Octave
    Introduction to GNU Octave Hubert Selhofer, revised by Marcel Oliver updated to current Octave version by Thomas L. Scofield 2008/08/16 line 1 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 8 6 4 2 -8 -6 0 -4 -2 -2 0 -4 2 4 -6 6 8 -8 Contents 1 Basics 2 1.1 What is Octave? ........................... 2 1.2 Help! . 2 1.3 Input conventions . 3 1.4 Variables and standard operations . 3 2 Vector and matrix operations 4 2.1 Vectors . 4 2.2 Matrices . 4 1 2.3 Basic matrix arithmetic . 5 2.4 Element-wise operations . 5 2.5 Indexing and slicing . 6 2.6 Solving linear systems of equations . 7 2.7 Inverses, decompositions, eigenvalues . 7 2.8 Testing for zero elements . 8 3 Control structures 8 3.1 Functions . 8 3.2 Global variables . 9 3.3 Loops . 9 3.4 Branching . 9 3.5 Functions of functions . 10 3.6 Efficiency considerations . 10 3.7 Input and output . 11 4 Graphics 11 4.1 2D graphics . 11 4.2 3D graphics: . 12 4.3 Commands for 2D and 3D graphics . 13 5 Exercises 13 5.1 Linear algebra . 13 5.2 Timing . 14 5.3 Stability functions of BDF-integrators . 14 5.4 3D plot . 15 5.5 Hilbert matrix . 15 5.6 Least square fit of a straight line . 16 5.7 Trapezoidal rule . 16 1 Basics 1.1 What is Octave? Octave is an interactive programming language specifically suited for vectoriz- able numerical calculations.
    [Show full text]
  • International Journal of Forecasting Guidelines for IJF Software Reviewers
    International Journal of Forecasting Guidelines for IJF Software Reviewers It is desirable that there be some small degree of uniformity amongst the software reviews in this journal, so that regular readers of the journal can have some idea of what to expect when they read a software review. In particular, I wish to standardize the second section (after the introduction) of the review, and the penultimate section (before the conclusions). As stand-alone sections, they will not materially affect the reviewers abillity to craft the review as he/she sees fit, while still providing consistency between reviews. This applies mostly to single-product reviews, but some of the ideas presented herein can be successfully adapted to a multi-product review. The second section, Overview, is an overview of the package, and should include several things. · Contact information for the developer, including website address. · Platforms on which the package runs, and corresponding prices, if available. · Ancillary programs included with the package, if any. · The final part of this section should address Berk's (1987) list of criteria for evaluating statistical software. Relevant items from this list should be mentioned, as in my review of RATS (McCullough, 1997, pp.182- 183). · My use of Berk was extremely terse, and should be considered a lower bound. Feel free to amplify considerably, if the review warrants it. In fact, Berk's criteria, if considered in sufficient detail, could be the outline for a review itself. The penultimate section, Numerical Details, directly addresses numerical accuracy and reliality, if these topics are not addressed elsewhere in the review.
    [Show full text]
  • A Tutorial on Reliable Numerical Computation
    A tutorial on reliable numerical computation Paul Zimmermann Dagstuhl seminar 17481, Schloß Dagstuhl, November 2017 The IEEE 754 standard First version in 1985, first revision in 2008, another revision for 2018. Standard formats: binary32, binary64, binary128, decimal64, decimal128 Standard rounding modes (attributes): roundTowardPositive, roundTowardNegative, roundTowardZero, roundTiesToEven p Correct rounding: required for +; −; ×; ÷; ·, recommended for other mathematical functions (sin; exp; log; :::) 2 Different kinds of arithmetic in various languages fixed precision arbitrary precision real double (C) GNU MPFR (C) numbers RDF (Sage) RealField(p) (Sage) MPFI (C) Boost Interval (C++) RealIntervalField(p) (Sage) real INTLAB (Matlab, Octave) RealBallField(p) (Sage) intervals RIF (Sage) libieeep1788 (C++) RBF (Sage) Octave Interval (Octave) libieeep1788 is developed by Marco Nehmeier GNU Octave Interval is developed by Oliver Heimlich 3 An example from Siegfried Rump Reference: S.M. Rump. Gleitkommaarithmetik auf dem Prüfstand [Wie werden verifiziert(e) numerische Lösungen berechnet?]. Jahresbericht der Deutschen Mathematiker-Vereinigung, 118(3):179–226, 2016. a p(a; b) = 21b2 − 2a2 + 55b4 − 10a2b2 + 2b Evaluate p at a = 77617, b = 33096. 4 Rump’s polynomial in the C language #include <stdio.h> TYPE p (TYPE a, TYPE b) { TYPE a2 = a * a; TYPE b2 = b * b; return 21.0*b2 - 2.0*a2 + 55*b2*b2 - 10*a2*b2 + a/(2.0*b); } int main() { printf ("%.16Le\n", (long double) p (77617.0, 33096.0)); } 5 Rump’s polynomial in the C language: results $ gcc -DTYPE=float rump.c && ./a.out -4.3870930862080000e+12 $ gcc -DTYPE=double rump.c && ./a.out 1.1726039400531787e+00 $ gcc -DTYPE="long double" rump.c && ./a.out 1.1726039400531786e+00 $ gcc -DTYPE=__float128 rump.c && ./a.out -8.2739605994682137e-01 6 The MPFR library A reference implementation of IEEE 754 in (binary) arbitrary precision in the C language.
    [Show full text]