Sponsored Content
Full Discussion: Floating Point Exception
Operating Systems Linux Floating Point Exception Post 302279157 by sysgate on Thursday 22nd of January 2009 04:04:24 AM
Old 01-22-2009
Can you share this piece of code, if possible ? If you're after 32-64 bit incompatibility - can you execute the same code successfully on a 32bit machine ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

floating point addition

hi, :) I have a file like this 10.456 123.567 456.876 234.987 ........ ....... What i want to do is ia have to add all those numbers and put the result in some other file. Any help pls. cheers RRK (8 Replies)
Discussion started by: ravi raj kumar
8 Replies

2. Programming

floating point problem

Hi all! Hi all! I am working with a problem to find the smallest floating point number that can be represented. I am going in a loop ,stating with an initial value of 1.0 and then diving it by 10 each time thru the loop. So the first time I am getting o.1 which I wanted.But from the next... (4 Replies)
Discussion started by: vijlak
4 Replies

3. Programming

Floating point error in C

Hi, see the simple code below double i; i=8080.9940; printf(" val :%.30f\n",i); output i m getting is val :8080.993999999999700000000000000 when i m expecting val :8080.9940 what happens?how can i avoid it? thanks... (2 Replies)
Discussion started by: Hara
2 Replies

4. Shell Programming and Scripting

BASH: floating point exception

Hi, guys, today, I have copied a simple script which runs correctly on a computer to another one. But, the latter informs me: Floating point exception! @ ./command_module a b c where command_module is the module compiled by myself. So, I have fixed it by following steps: 1.... (5 Replies)
Discussion started by: mapleleaves
5 Replies

5. Linux

Floating point exception !!!

Hi, I have linux fedora 4 ver., 2.6 kernal. And qmail & mysql & samba servers are already configured on this server. When I try to install any package like squidguard ,dansguardian,webmin,rsnapshots with command rpm -ivh . It is giving error as “Floating point exception" Snap View is... (3 Replies)
Discussion started by: ssk01
3 Replies

6. Programming

Floating point Emulator

what is floating point emulator(FPE)? where and why it is used? (1 Reply)
Discussion started by: pgmfourms
1 Replies

7. Shell Programming and Scripting

floating point numbers in if

# if > then > echo "1" > else > echo "2" > fi -bash: How can i compare floating point numbers inside statement? (15 Replies)
Discussion started by: proactiveaditya
15 Replies

8. Shell Programming and Scripting

Arithmetic in floating point

is it not possible to simply di aritmetic without using bc or awk i have tried folllowing operatrions but they support only integer types plz suggest me code for floating using values stored in the variables.the ans i get is integer and if i input floating values i get error numeric constant... (6 Replies)
Discussion started by: sumit the cool
6 Replies

9. Programming

Floating Point

Anyone help me i cant found the error of floating point if needed, i added the code complete #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> typedef struct { int hh; int mm; int ss; char nom; int punt; }cancion; typedef struct... (9 Replies)
Discussion started by: Slasho
9 Replies

10. Shell Programming and Scripting

[BASH] Floating point exception

Heyas I have a script (vhs - video handler script, using ffmpeg) to encode videos. It also encodes a dvd, but until now just non-copy-protected ones, so i've tried to add/implement a vobcopy wrapper to be used by my script. At first it looked quite fine, but when changing from the first VOB... (9 Replies)
Discussion started by: sea
9 Replies
FAST_DIVIDE32(3)					   BSD Library Functions Manual 					  FAST_DIVIDE32(3)

NAME
fast_divide32, fast_divide32_prepare, fast_remainder32 -- fast 32bit division and remainder SYNOPSIS
#include <sys/bitops.h> uint32_t fast_divide32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, uint8_t s2); uint32_t fast_remainder32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, uint8_t s2); void fast_divide32_prepare(uint32_t div, uint32_t *m, uint8_t *s1, uint8_t *s2); DESCRIPTION
The fast_divide32 and fast_remainder32 functions compute the equivalent of v / div and v % div using optimised CPU instructions. The con- stants m, s1, and s2 must first be preset for a given value of div with the fast_divide32_prepare function. RATIONALE
These functions are useful for inner loops and other performance-sensitive tasks. The functions expand to code that is typically slightly larger than a plain division instruction, but requires less time to execute. The code for constant div arguments should be equivalent to the assembly created by GCC. EXAMPLES
The following example computes q = a / b and r = a % b: uint32_t a, b, q, r, m; uint8_t s1, s2; fast_divide32_prepare(b, &m, &s1, &s2); q = fast_divide32(a, b, m, s1, s2); r = fast_remainder32(a, b, m, s1, s2); SEE ALSO
bitops(3), div(3), remainder(3) Torbjorn Granlund and Peter L. Montgomery, "Division by Invariant Integers Using Multiplication", ACM SIGPLAN Notices, Issue 6, Volume 29, http://gmplib.org/~tege/divcnst-pldi94.pdf, 61-72, June 1994. HISTORY
The fast_divide32 function appeared in NetBSD 6.0. BSD
May 10, 2011 BSD
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy