Beej's Guide to C Programming

Total Page:16

File Type:pdf, Size:1020Kb

Beej's Guide to C Programming Beej’s Guide to C Programming Brian “Beej Jorgensen” Hall v0.6.35, Copyright © September 30, 2021 Contents 1 Foreword 1 1.1 Audience ........................................ 1 1.2 Platform and Compiler ................................. 2 1.3 Official Homepage ................................... 2 1.4 Email Policy ...................................... 2 1.5 Mirroring ........................................ 2 1.6 Note for Translators .................................. 2 1.7 Copyright and Distribution ............................... 3 2 Hello, World! 4 2.1 What to Expect from C ................................. 4 2.2 Hello, World! ...................................... 5 2.3 Compilation Details .................................. 6 2.4 Building with gcc ................................... 7 2.5 Building with clang .................................. 7 2.6 Building from IDEs ................................... 7 2.7 C Versions ....................................... 8 3 Variables and Statements 9 3.1 Variables ........................................ 9 3.1.1 Variable Names ................................. 9 3.1.2 Variable Types .................................. 10 3.1.3 Boolean Types .................................. 11 3.2 Operators and Expressions ............................... 12 3.2.1 Arithmetic .................................... 12 3.2.2 Ternary Operator ................................. 12 3.2.3 Pre-and-Post Increment-and-Decrement ..................... 13 3.2.4 The Comma Operator .............................. 13 3.2.5 Conditional Operators .............................. 14 3.2.6 Boolean Operators ................................ 14 3.2.7 The sizeof Operator .............................. 15 3.3 Flow Control ...................................... 15 3.3.1 The if-else statement .............................. 16 3.3.2 The while statement ............................... 17 3.3.3 The do-while statement ............................. 18 3.3.4 The for statement ................................ 19 3.3.5 The switch Statement .............................. 19 4 Functions 22 4.1 Passing by Value .................................... 23 4.2 Function Prototypes .................................. 24 4.3 Empty Parameter Lists ................................. 25 5 Pointers—Cower In Fear! 26 5.1 Memory and Variables ................................. 26 5.2 Pointer Types ...................................... 28 5.3 Dereferencing ..................................... 29 5.4 Passing Pointers as Arguments ............................. 29 i CONTENTS ii 5.5 The NULL Pointer .................................... 31 5.6 A Note on Declaring Pointers .............................. 31 5.7 sizeof and Pointers .................................. 32 6 Arrays 33 6.1 Easy Example ..................................... 33 6.2 Getting the Length of an Array ............................. 34 6.3 Array Initializers .................................... 34 6.4 Out of Bounds! ..................................... 36 6.5 Multidimensional Arrays ................................ 36 6.6 Arrays and Pointers ................................... 37 6.6.1 Getting a Pointer to an Array ........................... 37 6.6.2 Passing Single Dimensional Arrays to Functions . 38 6.6.3 Changing Arrays in Functions .......................... 39 6.6.4 Passing Multidimensional Arrays to Functions . 40 7 Strings 41 7.1 String Literals ..................................... 41 7.2 String Variables ..................................... 41 7.3 String Variables as Arrays ............................... 41 7.4 String Initializers .................................... 42 7.5 Getting String Length .................................. 43 7.6 String Termination ................................... 43 7.7 Copying a String .................................... 44 8 Structs 46 8.1 Declaring a Struct ................................... 46 8.2 Struct Initializers .................................... 47 8.3 Passing Structs to Functions .............................. 47 8.4 The Arrow Operator .................................. 48 8.5 Copying and Returning structs ............................ 49 9 File Input/Output 50 9.1 The FILE* Data Type .................................. 50 9.2 Reading Text Files ................................... 51 9.3 End of File: EOF .................................... 51 9.3.1 Reading a Line at a Time ............................. 52 9.4 Formatted Input .................................... 53 9.5 Writing Text Files ................................... 53 9.6 Binary File I/O ..................................... 54 9.6.1 struct and Number Caveats ........................... 55 10 typedef: Making New Types 57 10.1 typedef in Theory ................................... 57 10.1.1 Scoping ..................................... 57 10.2 typedef in Practice .................................. 57 10.2.1 typedef and structs .............................. 57 10.2.2 typedef and Other Types ............................ 59 10.2.3 typedef and Pointers .............................. 59 10.2.4 typedef and Capitalization ........................... 59 10.3 Arrays and typedef .................................. 60 11 Pointers II: Arithmetic 61 11.1 Pointer Arithmetic ................................... 61 11.1.1 Adding to Pointers ................................ 61 11.1.2 Changing Pointers ................................ 62 11.1.3 Subtracting Pointers ............................... 63 11.2 Array/Pointer Equivalence ............................... 63 11.2.1 Array/Pointer Equivalence in Function Calls ................... 64 CONTENTS iii 11.3 void Pointers ...................................... 65 12 Manual Memory Allocation 69 12.1 Allocating and Deallocating, malloc() and free() . 69 12.2 Error Checking ..................................... 70 12.3 Allocating Space for an Array ............................. 70 12.4 An Alternative: calloc() ............................... 71 12.5 Changing Allocated Size with realloc() ....................... 72 12.5.1 Reading in Lines of Arbitrary Length ...................... 73 12.5.2 realloc() with NULL .............................. 74 12.6 Aligned Allocations .................................. 75 13 Scope 77 13.1 Block Scope ...................................... 77 13.1.1 Where To Define Variables ............................ 77 13.1.2 Variable Hiding ................................. 78 13.2 File Scope ....................................... 78 13.3 for-loop Scope ..................................... 79 13.4 A Note on Function Scope ............................... 79 14 Types II: Way More Types! 80 14.1 Signed and Unsigned Integers ............................. 80 14.2 Character Types .................................... 81 14.3 More Integer Types: short, long, long long ..................... 82 14.4 More Float: double and long double ........................ 84 14.4.1 How Many Decimal Digits? ........................... 85 14.4.2 Converting to Decimal and Back ......................... 86 14.5 Constant Numeric Types ................................ 87 14.5.1 Hexadecimal and Octal .............................. 87 14.5.2 Integer Constants ................................. 88 14.5.3 Floating Point Constants ............................. 89 15 Types III: Conversions 91 15.1 String Conversions ................................... 91 15.1.1 Numeric Value to String ............................. 91 15.1.2 String to Numeric Value ............................. 92 15.2 Numeric Conversions .................................. 94 15.2.1 Boolean ..................................... 94 15.2.2 Integer to Integer Conversions .......................... 94 15.2.3 Integer and Floating Point Conversions ..................... 95 15.3 Implicit Conversions .................................. 95 15.3.1 The Integer Promotions ............................. 95 15.3.2 The Usual Arithmetic Conversions ........................ 95 15.3.3 void* ...................................... 96 15.4 Explicit Conversions .................................. 96 15.4.1 Casting ...................................... 96 16 Types IV: Qualifiers and Specifiers 98 16.1 Type Qualifiers ..................................... 98 16.1.1 const ...................................... 98 16.1.2 restrict ....................................100 16.1.3 volatile ....................................101 16.1.4 _Atomic .....................................101 16.2 Storage-Class Specifiers ................................101 16.2.1 auto .......................................101 16.2.2 static ......................................101 16.2.3 extern ......................................102 16.2.4 register ....................................103 16.2.5 _Thread_local .................................104 CONTENTS iv 17 Multifile Projects 105 17.1 Includes and Function Prototypes ............................105 17.2 Dealing with Repeated Includes ............................107 17.3 static and extern ..................................108 17.4 Compiling with Object Files ..............................108 18 The Outside Environment 109 18.1 Command Line Arguments ...............................109 18.1.1 The Last argv is NULL .............................. 111 18.1.2 The Alternate: char **argv .......................... 111 18.1.3 Fun Facts .....................................112 18.2 Exit Status .......................................112 18.2.1 Other Exit Status Values ............................. 114 18.3 Environment Variables
Recommended publications
  • Technical Report TR-2020-10
    Simulation-Based Engineering Lab University of Wisconsin-Madison Technical Report TR-2020-10 CryptoEmu: An Instruction Set Emulator for Computation Over Ciphers Xiaoyang Gong and Dan Negrut December 28, 2020 Abstract Fully homomorphic encryption (FHE) allows computations over encrypted data. This technique makes privacy-preserving cloud computing a reality. Users can send their encrypted sensitive data to a cloud server, get encrypted results returned and decrypt them, without worrying about data breaches. This project report presents a homomorphic instruction set emulator, CryptoEmu, that enables fully homomorphic computation over encrypted data. The software-based instruction set emulator is built upon an open-source, state-of-the-art homomorphic encryption library that supports gate-level homomorphic evaluation. The instruction set architecture supports multiple instructions that belong to the subset of ARMv8 instruction set architecture. The instruction set emulator utilizes parallel computing techniques to emulate every functional unit for minimum latency. This project re- port includes details on design considerations, instruction set emulator architecture, and datapath and control unit implementation. We evaluated and demonstrated the instruction set emulator's performance and scalability on a 48-core workstation. Cryp- toEmu shown a significant speed up in homomorphic computation performance when compared with HELib, a state-of-the-art homomorphic encryption library. Keywords: Fully Homomorphic Encryption, Parallel Computing, Homomorphic Instruction Set, Homomorphic Processor, Computer Architecture 1 Contents 1 Introduction 3 2 Background 4 3 TFHE Library 5 4 CryptoEmu Architecture Overview 7 4.1 Data Processing . .8 4.2 Branch and Control Flow . .9 5 Data Processing Units 9 5.1 Load/Store Unit . .9 5.2 Adder .
    [Show full text]
  • Chapter 5 Formatting Pages: Basics Page Styles and Related Features Copyright
    Writer 6.0 Guide Chapter 5 Formatting Pages: Basics Page styles and related features Copyright This document is Copyright © 2018 by the LibreOffice Documentation Team. Contributors are listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/), version 4.0 or later. All trademarks within this guide belong to their legitimate owners. Contributors Jean Hollis Weber Bruce Byfield Gillian Pollack Acknowledgments This chapter is updated from previous versions of the LibreOffice Writer Guide. Contributors to earlier versions are: Jean Hollis Weber John A Smith Ron Faile Jr. Jamie Eby This chapter is adapted from Chapter 4 of the OpenOffice.org 3.3 Writer Guide. The contributors to that chapter are: Agnes Belzunce Ken Byars Daniel Carrera Peter Hillier-Brook Lou Iorio Sigrid Kronenberger Peter Kupfer Ian Laurenson Iain Roberts Gary Schnabl Janet Swisher Jean Hollis Weber Claire Wood Michele Zarri Feedback Please direct any comments or suggestions about this document to the Documentation Team’s mailing list: [email protected] Note Everything you send to a mailing list, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted. Publication date and software version Published July 2018. Based on LibreOffice 6.0. Note for macOS users Some keystrokes and menu items are different on macOS from those used in Windows and Linux. The table below gives some common substitutions for the instructions in this book.
    [Show full text]
  • CHERI C/C++ Programming Guide
    UCAM-CL-TR-947 Technical Report ISSN 1476-2986 Number 947 Computer Laboratory CHERI C/C++ Programming Guide Robert N. M. Watson, Alexander Richardson, Brooks Davis, John Baldwin, David Chisnall, Jessica Clarke, Nathaniel Filardo, Simon W. Moore, Edward Napierala, Peter Sewell, Peter G. Neumann June 2020 15 JJ Thomson Avenue Cambridge CB3 0FD United Kingdom phone +44 1223 763500 https://www.cl.cam.ac.uk/ c 2020 Robert N. M. Watson, Alexander Richardson, Brooks Davis, John Baldwin, David Chisnall, Jessica Clarke, Nathaniel Filardo, Simon W. Moore, Edward Napierala, Peter Sewell, Peter G. Neumann, SRI International This work was supported by the Defense Advanced Research Projects Agency (DARPA) and the Air Force Research Laboratory (AFRL), under contracts FA8750-10-C-0237 (“CTSRD”) and HR0011-18-C-0016 (“ECATS”). The views, opinions, and/or findings contained in this report are those of the authors and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. This work was supported in part by the Innovate UK project Digital Security by Design (DSbD) Technology Platform Prototype, 105694. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 789108), ERC Advanced Grant ELVER. We also acknowledge the EPSRC REMS Programme Grant (EP/K008528/1), Arm Limited, HP Enterprise, and Google, Inc. Approved for Public Release, Distribution Unlimited. Technical reports published by the University of Cambridge Computer Laboratory are freely available via the Internet: https://www.cl.cam.ac.uk/techreports/ ISSN 1476-2986 3 Abstract This document is a brief introduction to the CHERI C/C++ programming languages.
    [Show full text]
  • XL C/C++ for AIX, V13.1.2 IBM
    IBM XL C/C++ for AIX, V13.1.2 IBM Optimization and Programming Guide Version 13.1.2 SC27-4261-01 IBM XL C/C++ for AIX, V13.1.2 IBM Optimization and Programming Guide Version 13.1.2 SC27-4261-01 Note Before using this information and the product it supports, read the information in “Notices” on page 185. First edition This edition applies to IBM XL C/C++ for AIX, V13.1.2 (Program 5765-J07; 5725-C72) and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product. © Copyright IBM Corporation 1996, 2015. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document ........ vii Using a heap ............. 33 Who should read this document ....... vii Getting information about a heap ...... 34 How to use this document ......... vii Closing and destroying a heap ....... 34 How this document is organized ....... vii Changing the default heap used in a program .. 35 Conventions .............. viii Compiling and linking a program with Related information ........... xii user-created heaps ........... 35 IBM XL C/C++ information ........ xii Example of a user heap with regular memory .. 35 Standards and specifications ....... xiii Debugging memory heaps ......... 36 Other IBM information ......... xiv Functions for checking memory heaps .... 37 Other information ........... xiv Functions for debugging memory heaps .... 37 Technical support ............ xiv Using memory allocation fill patterns..... 39 How to send your comments ........ xiv Skipping heap checking ......... 39 Using stack traces ........... 40 Chapter 1.
    [Show full text]
  • CM-5 C* User's Guide
    The Connection Machine System CM-5 C* User's Guide ---------__------- . Version 7.1 May 1993 Thinking Machines Corporation Cambridge, Massachusetts Frst printing, May 1993 The informatiaonin this document is subject to change without notice and should not be constnued as a commitmentby ThinngMacMachines po Thk Machinesreservestheright toae changesto any product described herein Although the information inthis document has beenreviewed and is believed to bereliable, Thinldng Machines Coaporation assumes no liability for erns in this document Thinklng Machines does not assume any liability arising from the application or use of any information or product described herein Connection Machine is a registered traemark of Thinking Machines Corporation. CM and CM-5 are trademarks of Thinking Machines Corpoation. CMosr, Prism, and CMAX are trademaks of Thinking Machines Corporation. C*4is a registered trademark of Thinking Machines Corporation CM Fortran is a trademark of Thinking Machines Corporation CMMD,CMSSL, and CMXIl are tdemarks of Thinking Machines Corporation. Thinking Machines is a registered trademark of Thinking Machines Corporatin. SPARCand SPARCstationare trademarks of SPARCintematinal, Inc. Sun, Sun,4, and Sun Workstation are trademarks of Sun Microsystems, Inc. UNIX is a registered trademark of UNIX System Laboratoies, Inc. The X Window System is a trademark of the Massachusetts Institute of Technology. Copyright © 1990-1993 by Thinking Machines Corporatin. All rights reserved. Thinking Machines Corporation 245 First Street Cambridge, Massachusetts 02142-1264 (617) 234-1000 Contents About This Manual .......................................................... viU Custom Support ........................................................ ix Chapter 1 Introduction ........................................ 1 1.1 Developing a C* Program ........................................ 1 1.2 Compiling a C* Program ......................................... 1 1.3 Executing a C* Program ........................................
    [Show full text]
  • Exploring C Semantics and Pointer Provenance
    Exploring C Semantics and Pointer Provenance KAYVAN MEMARIAN, University of Cambridge VICTOR B. F. GOMES, University of Cambridge BROOKS DAVIS, SRI International STEPHEN KELL, University of Cambridge ALEXANDER RICHARDSON, University of Cambridge ROBERT N. M. WATSON, University of Cambridge PETER SEWELL, University of Cambridge The semantics of pointers and memory objects in C has been a vexed question for many years. C values cannot be treated as either purely abstract or purely concrete entities: the language exposes their representations, 67 but compiler optimisations rely on analyses that reason about provenance and initialisation status, not just runtime representations. The ISO WG14 standard leaves much of this unclear, and in some respects differs with de facto standard usage — which itself is difficult to investigate. In this paper we explore the possible source-language semantics for memory objects and pointers, in ISO C and in C as it is used and implemented in practice, focussing especially on pointer provenance. We aim to, as far as possible, reconcile the ISO C standard, mainstream compiler behaviour, and the semantics relied on by the corpus of existing C code. We present two coherent proposals, tracking provenance via integers and not; both address many design questions. We highlight some pros and cons and open questions, and illustrate the discussion with a library of test cases. We make our semantics executable as a test oracle, integrating it with the Cerberus semantics for much of the rest of C, which we have made substantially more complete and robust, and equipped with a web-interface GUI. This allows us to experimentally assess our proposals on those test cases.
    [Show full text]
  • Operating Systems and Applications for Embedded Systems >>> Toolchains
    >>> Operating Systems And Applications For Embedded Systems >>> Toolchains Name: Mariusz Naumowicz Date: 31 sierpnia 2018 [~]$ _ [1/19] >>> Plan 1. Toolchain Toolchain Main component of GNU toolchain C library Finding a toolchain 2. crosstool-NG crosstool-NG Installing Anatomy of a toolchain Information about cross-compiler Configruation Most interesting features Sysroot Other tools POSIX functions AP [~]$ _ [2/19] >>> Toolchain A toolchain is the set of tools that compiles source code into executables that can run on your target device, and includes a compiler, a linker, and run-time libraries. [1. Toolchain]$ _ [3/19] >>> Main component of GNU toolchain * Binutils: A set of binary utilities including the assembler, and the linker, ld. It is available at http://www.gnu.org/software/binutils/. * GNU Compiler Collection (GCC): These are the compilers for C and other languages which, depending on the version of GCC, include C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go. They all use a common back-end which produces assembler code which is fed to the GNU assembler. It is available at http://gcc.gnu.org/. * C library: A standardized API based on the POSIX specification which is the principle interface to the operating system kernel from applications. There are several C libraries to consider, see the following section. [1. Toolchain]$ _ [4/19] >>> C library * glibc: Available at http://www.gnu.org/software/libc. It is the standard GNU C library. It is big and, until recently, not very configurable, but it is the most complete implementation of the POSIX API. * eglibc: Available at http://www.eglibc.org/home.
    [Show full text]
  • X86 Assembly Language Syllabus for Subject: Assembly (Machine) Language
    VŠB - Technical University of Ostrava Department of Computer Science, FEECS x86 Assembly Language Syllabus for Subject: Assembly (Machine) Language Ing. Petr Olivka, Ph.D. 2021 e-mail: [email protected] http://poli.cs.vsb.cz Contents 1 Processor Intel i486 and Higher – 32-bit Mode3 1.1 Registers of i486.........................3 1.2 Addressing............................6 1.3 Assembly Language, Machine Code...............6 1.4 Data Types............................6 2 Linking Assembly and C Language Programs7 2.1 Linking C and C Module....................7 2.2 Linking C and ASM Module................... 10 2.3 Variables in Assembly Language................ 11 3 Instruction Set 14 3.1 Moving Instruction........................ 14 3.2 Logical and Bitwise Instruction................. 16 3.3 Arithmetical Instruction..................... 18 3.4 Jump Instructions........................ 20 3.5 String Instructions........................ 21 3.6 Control and Auxiliary Instructions............... 23 3.7 Multiplication and Division Instructions............ 24 4 32-bit Interfacing to C Language 25 4.1 Return Values from Functions.................. 25 4.2 Rules of Registers Usage..................... 25 4.3 Calling Function with Arguments................ 26 4.3.1 Order of Passed Arguments............... 26 4.3.2 Calling the Function and Set Register EBP...... 27 4.3.3 Access to Arguments and Local Variables....... 28 4.3.4 Return from Function, the Stack Cleanup....... 28 4.3.5 Function Example.................... 29 4.4 Typical Examples of Arguments Passed to Functions..... 30 4.5 The Example of Using String Instructions........... 34 5 AMD and Intel x86 Processors – 64-bit Mode 36 5.1 Registers.............................. 36 5.2 Addressing in 64-bit Mode.................... 37 6 64-bit Interfacing to C Language 37 6.1 Return Values..........................
    [Show full text]
  • Bitwise Operators in C Examples
    Bitwise Operators In C Examples Alphonse misworships discommodiously. Epigastric Thorvald perishes changefully while Oliver always intercut accusatively.his anthology plumps bravely, he shown so cheerlessly. Baillie argufying her lashkar coweringly, she mass it Find the program below table which is c operators associate from star from the positive Left shift shifts each bit in its left operand to the left. Tying up some Arduino loose ends before moving on. The next example shows you how to do this. We can understand this better using the following Example. These operators move each bit either left or right a specified number of times. Amazon and the Amazon logo are trademarks of Amazon. Binary form of these values are given below. Shifting the bits of the string of bitwise operators in c examples and does not show the result of this means the truth table for making. Mommy, security and web. When integers are divided, it shifts the bits to the right. Operators are the basic concept of any programming language, subtraction, we are going to see how to use bitwise operators for counting number of trailing zeros in the binary representation of an integer? Adding a negative and positive number together never means the overflow indicates an exception! Not valid for string or complex operands. Les cookies essentiels sont absolument necessaires au bon fonctionnement du site. Like the assembly in C language, unlike other magazines, you may treat this as true. Bitwise OR operator is used to turn bits ON. To me this looks clearer as is. We will talk more about operator overloading in a future section, and the second specifies the number of bit positions by which the first operand is to be shifted.
    [Show full text]
  • Section “Common Predefined Macros” in the C Preprocessor
    The C Preprocessor For gcc version 12.0.0 (pre-release) (GCC) Richard M. Stallman, Zachary Weinberg Copyright c 1987-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. A copy of the license is included in the section entitled \GNU Free Documentation License". This manual contains no Invariant Sections. The Front-Cover Texts are (a) (see below), and the Back-Cover Texts are (b) (see below). (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. i Table of Contents 1 Overview :::::::::::::::::::::::::::::::::::::::: 1 1.1 Character sets:::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Initial processing ::::::::::::::::::::::::::::::::::::::::::::::: 2 1.3 Tokenization ::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1.4 The preprocessing language :::::::::::::::::::::::::::::::::::: 6 2 Header Files::::::::::::::::::::::::::::::::::::: 7 2.1 Include Syntax ::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.2 Include Operation :::::::::::::::::::::::::::::::::::::::::::::: 8 2.3 Search Path :::::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.4 Once-Only Headers::::::::::::::::::::::::::::::::::::::::::::: 9 2.5 Alternatives to Wrapper #ifndef ::::::::::::::::::::::::::::::
    [Show full text]
  • IEEE Standard 754 for Binary Floating-Point Arithmetic
    Work in Progress: Lecture Notes on the Status of IEEE 754 October 1, 1997 3:36 am Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic Prof. W. Kahan Elect. Eng. & Computer Science University of California Berkeley CA 94720-1776 Introduction: Twenty years ago anarchy threatened floating-point arithmetic. Over a dozen commercially significant arithmetics boasted diverse wordsizes, precisions, rounding procedures and over/underflow behaviors, and more were in the works. “Portable” software intended to reconcile that numerical diversity had become unbearably costly to develop. Thirteen years ago, when IEEE 754 became official, major microprocessor manufacturers had already adopted it despite the challenge it posed to implementors. With unprecedented altruism, hardware designers had risen to its challenge in the belief that they would ease and encourage a vast burgeoning of numerical software. They did succeed to a considerable extent. Anyway, rounding anomalies that preoccupied all of us in the 1970s afflict only CRAY X-MPs — J90s now. Now atrophy threatens features of IEEE 754 caught in a vicious circle: Those features lack support in programming languages and compilers, so those features are mishandled and/or practically unusable, so those features are little known and less in demand, and so those features lack support in programming languages and compilers. To help break that circle, those features are discussed in these notes under the following headings: Representable Numbers, Normal and Subnormal, Infinite
    [Show full text]
  • User's Manual
    rBOX610 Linux Software User’s Manual Disclaimers This manual has been carefully checked and believed to contain accurate information. Axiomtek Co., Ltd. assumes no responsibility for any infringements of patents or any third party’s rights, and any liability arising from such use. Axiomtek does not warrant or assume any legal liability or responsibility for the accuracy, completeness or usefulness of any information in this document. Axiomtek does not make any commitment to update the information in this manual. Axiomtek reserves the right to change or revise this document and/or product at any time without notice. No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Axiomtek Co., Ltd. Trademarks Acknowledgments Axiomtek is a trademark of Axiomtek Co., Ltd. ® Windows is a trademark of Microsoft Corporation. Other brand names and trademarks are the properties and registered brands of their respective owners. Copyright 2014 Axiomtek Co., Ltd. All Rights Reserved February 2014, Version A2 Printed in Taiwan ii Table of Contents Disclaimers ..................................................................................................... ii Chapter 1 Introduction ............................................. 1 1.1 Specifications ...................................................................................... 2 Chapter 2 Getting Started ......................................
    [Show full text]