QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

Is floating point arithmetic supported?

SystemCrafter - FAQ
No, floating point is not supported by SystemCrafter SC Version 2.0. Floating point hardware implementations are extremely resource intensive and floating point algorithms can normally be more efficiently realised using integer arithmetic.

Is fixed point arithmetic supported?

SystemCrafter - FAQ
No, fixed point is not supported by SystemCrafter SC Version 2.0. Fixed point algorithms can always be modified to use integer arithmetic by applying suitable constant multipliers.

What is so ''unsafe'' about floating point?

Infrequently Asked Questions in comp.lang.c
Have you tried EXAMINE STICK? The stick has a sharp point, which punctures the raft, which no longer floats. Don't bring the stick into the raft with you.

What constitutes a floating point operation (a FLOP)?

The Aggregate: Frequently Asked Questions about KASY0
Obviously, any operation on a floating-point value, right? Well, yes and no.

What are floating-point numbers?

Frequently Asked Questions (FAQ)
A floating-point number is a number that has a fractional part; it is written with a decimal point, e.g.: 2.5, 3.141, -5.99. Floating point numbers are distinguished from integers, which have no fractional part. In Java, there are two types of floating-point numbers, those of type float and those of type double. Numbers of type double have higher precision than those of type float. By default, we will use double for floating-point numbers in CS111.

How to convert floating point decimal to binary?

JavaChina: SCJP Questions & Answers by Roseanne Zhang (8...
In the integer part, you devide by 2. In the decimal part, you multiply by 2 Decimal Binary 2 10 4 100 8 1000 16 10000 0.5 0.1 0.25 0.01 0.125 0.001 0.0625 0.0001 ... You should get my point now.

How can I handle floating-point exceptions gracefully?

System Dependencies
On many systems, you can define a function matherr which will be called when there are certain floating-point errors, such as errors in the math routines in <math.h>. You may also be able to use signal (see question 19.38) to catch SIGFPE. See also questions 14.9 and 20.6b.

How can I store a floating point number into an integer?

COSC 2410: Computer Organization and Programming Lab Web Pag...
FIST stores the value in ST to the specified memory location or register. Temporary-real values in registers are converted to the appropriate integer, BCD, or floating-point format as they are stored. With FSTP, FISTP, and FBSTP, the ST register value is popped off the stack. Memory operands can be 32-, 64-, or 80-bit real numbers for FSTP, or 16-, 32-, or 64-bit integers for FISTP.

Can you change or enter floating point values?

Binary file editor for Windows, FAQ
You can enter a new floating point value in the fields of the Properties dialog. Just type the new value into the "value" field and press Enter (or Esc to abort). You can enter IEEE floating point values using the "IEEE" page or IBM floating point values using the "IBM FP" page. You can also change the byte-order using the "Big-endian" check box and enter 32-bit or 64-bit values depending on the format selected.

Why doesn't my floating-point comparison work?

Newbie Questions / Answers Updated! , C++ FAQ Lite
Why is cos(x) != cos(y) even though x == y? (Or sine or tangent or log or just about any other floating point computation) New!

How do I perform point-wise arithmetic operations?

GC Image Users' Guide: Answers to Frequently Asked Questions...
Step 2: From the Arithmetic Operations popup dialog, select the arithmetic operation, whether the operation is with a scalar or image operand, and, for an image operand, the operand file name. Then, click OK.

Why does a decimal point not indicate floating-point?

comp.lang.forth Frequently Asked Questions (1/6): General/Mi...
In the old days Forth did not have floating-point numbers; instead, fixed-point arithmetic was used, usually on double-cell numbers. So, a decimal point indicated a double number (the position of the decimal point was stored in the variable DPL for potential use by fixed-boint software). In ANS Forth, a decimal point at the end indicates a double-cell number, and an E in the number indicates a floating-point number (when BASE is decimal). All other ways to write numbers are system-dependent.

How does base arithmetic work?

Z-Shell Frequently-Asked Questions
The ksh syntax is now understood, i.e. let 'foo = 16#ff' or equivalently (( foo = 16#ff )) or even foo=$((16#ff)) The original syntax was (( foo = [16]ff )) --- this was based on a misunderstanding of the ksh manual page. It still works but its use is deprecated. Then echo $foo gives the answer '255'.

Why do I get an "Arithmetic overflow" message?

HI-TECH Software Frequently Asked Questions
Q1: If I assign 0xFFFF to an integer, I get the message "arithmetic overflow in constant expression. Why doesn't it just treat it as -1? A1: As an int, this variable can only assume values of -32768 thru to 32767. The value 0xFFFF is equal to 65535, and is thus too big. If you really don't want signed values, use an unsigned int, or use -1, or use ~0. In general, if you want a value that has all bits set, and you don't want to be specific about how many bits that is, ~0 is good. e.g.

How do I enable software assisted floating point numbers?

Gentoo Linux Documentation -- Gentoo Linux/Alpha Frequently ...
You can enable software assisted floating point numbers with -mieee. This will enable software assistance to correctly support denormalized numbers and exceptional IEEE values such as not-a-number and plus/minus infinity.

How can I make a floating point comparison function for use with qsort?

Frequently Asked Questions
Here is a simple example (called "Sort Floats"): // Sort a list of floating point values #define USE_TI89 // Compile for TI-89 #define USE_TI92PLUS // Compile for TI-92 Plus #define USE_V200 // Compile for V200 #define MIN_AMS 100 // Compile for AMS 1.00 or higher #define SAVE_SCREEN // Save/Restore LCD Contents #include <tigcclib.

How do I use variable precision fixed and floating point computation in Super-FinSim?

Frequently Asked Questions about FinSim
i) Please read chapter 8 of Super FinSim 8.4 Users Guide, which is available in .htm as well as in .pdf format on this WEB site. ii) The commercially available FinSim has a limitation of 127 bits of precision for trigonometric, and hyperbolic functions and of 82 bits for exponential and logarithmic functions. Customized versions may support enhanced precision.

Why don't floating point numbers work with the printf and scanf functions?

Frequently Asked Questions
In order to minimize size, versions of the printf and scanf functions without floating point support are linked by default. To enable floating point printf and scanf support, set the Floating Point I/O Supported property of your project to Yes.

Why doesn't AutoOpts handle floating point option arguments?

AutoGen's Frequently Asked Questions
Because handling it yourself is trivial, handling it in a fully integrated fashion is hard and I don't use floating point myself. Write your own callback routine. flag = { name = something; value = s; arg-type = string; arg-name = float; descrip = "floating point argument"; doc = "Example of an option with a floating point arg.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact