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. append the current directory of the command_module to PATH
2. delete the characters of ./
3. rename command_module as commandmodule, else the error is still informed.
So, my question is what is the reason for it? Although it seems that the script is running correctly again, I am confused... who knows why?
today, I have copied a simple script which runs correctly on a computer to another one.
What is in that script?
Quote:
But, the latter informs me:
Floating point exception!
What line causes that error?
What is the full error message?
Quote:
@ ./command_module a b c
What is '@'?
Quote:
where command_module is the module compiled by myself.
So, I have fixed it by following steps:
1. append the current directory of the command_module to PATH
2. delete the characters of ./
3. rename command_module as commandmodule, else the error is still informed.
So, my question is what is the reason for it? Although it seems that the script is running correctly again, I am confused... who knows why?
None of the steps you describe would fix that error, unless having the additional directory in your PATH caused the script to call a different version of a command.
The error "BASH: floating point exception " are outputed at the lines of
case 2 and 3.
And AutoRandom, lp_solve, lpsolve, combine are executable files compiled by myself.
The full error message:
+ ./lp_solve -time -sp secure.lp
./ExpScriptOld: line 55: 7304 Floating point exception./lp_solve -time -sp secure.lp >$lpfilename 2>&1
What is '@'?
@ is typed by myself. Sorry, just means AT.
The script is pasted here:
++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++
[quote=cfajohnson;302225783]
What is in that script?
What line causes that error?
What is the full error message?
What is '@'?
None of the steps you describe would fix that error, unless having the additional directory in your PATH caused the script to call a different version of a command.
Last edited by mapleleaves; 08-22-2008 at 09:23 AM..
I have the following code snippet in bash
if ]; then
minm=`echo "$diff" | bc`
fi
It works well for most of the cases. However lets say diff is -0.17 and minm is -0.0017. In such a case the comparison seems to fail. Is the correct way to compare a mixture of positive and... (12 Replies)
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)
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)
Hello Everyone,
I am currently working on a script to calculate optimal tcp window size
the formula that I am following is
2 x (bandwith speed /8 * Round Trip Time ) = x
This is what I have so far
#!/bin/bash
echo "Enter connection speed" << Get the speed of the Connection from... (3 Replies)
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)
Dear all,
I have the following question. Let's say that I have the following script
#!/bin/bash
value=0.4987865
a=` printf "%6.2f" $value `
b=`echo $value + $value | bc -l`
echo $a
echo $b
exit
And the exit is:
0,00
.9975730
Thus, the problem is that the printf order does not... (2 Replies)
Hi,
I am compiling "HelloWorld" C progam on 32-bit CentOS and i want to execute it on 64-bit CentOS architecture.
For that i copied the a.out file from 32-bit to 64-bit machine, but while executing a.out file on 64bit machine I am getting "Floating point exception error".
But we can run... (3 Replies)
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)