Hi everybody,
I want to know how can i use the command 'expr' to manipulate float number , i have a shell bash and when (for example) i do:
y1=`expr \( 1/ 16 \)`
it returns 0
and if i do
y1=`expr \( 1.6 / 16 \)`
it returns non numeric argument.
is there another command for mathematic... (4 Replies)
I had a variable 1:80 8 in one varialbe say var=1:80 8
i comapred the below
if
then
--
else
----
thought if condition is true its always going in the else condition....its not giving any compilation errror also....is there any problem bcoz of space...
can some one help... (3 Replies)
Good morning,
I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>
int main (void)
{
float ceilf(float x);
int dev=3, result=0;
float tmp = 3.444f;
printf("Result: %f\n",ceilf(tmp));
return 0;
} (1 Reply)
i am adding two floating point numbers and i want to store in a character pointer...
float f1 ;
float f2 ;
char *c = NULL;
printf("Enter 2 floating numbers\n");
scanf("%f %f",&f1,&f2);
f1 = f1+f2;
sprintf(c, "%f", f1 );
when i execute this, i am... (3 Replies)
I have a file with 2 columns . One of the line looks like the following.
Is it possible to convert every float no in column 2 to integer.
input
NM_032881 6.03787973608527e-05
output
0.0000603787..... (2 Replies)
I'm trying to only read price (FLOAT (i.e 1.10, 3.14, etc etc))
If the input is just an integer, I will add a .00 behind. (i.e 3 becomes 3.00 , 20 becomes 20.00)
If the input is without 2 decimal places, I'll add a 0. (i.e 3.1 becomes 3.10)
I tried using the below code, it works but I don't... (6 Replies)
:confused:We have two servers one active and one stand by
as follows Active 202.61.9.9
Stand by 202.61.9.10
Float IP 202.61.9.8
What is use of this float IP?
How it is configured? (1 Reply)
Hi everyone,
I'm having some trouble with float array.
When i try to get the array sum with float numbers i get this error line 39: soma + 2.34 | bc: syntax error: invalid arithmetic operator (error token is ".34 | bc")
26 Somar() {
27 echo "Quantos numeros deseja somar?"
28 read... (4 Replies)
Discussion started by: berveglieri
4 Replies
LEARN ABOUT DEBIAN
struct::compare
Compare(3pm) User Contributed Perl Documentation Compare(3pm)NAME
Struct::Compare - Recursive diff for perl structures.
SYNOPSIS
use Struct::Compare;
my $is_different = compare($ref1, $ref2);
DESCRIPTION
Compares two values of any type and structure and returns true if they are the same. It does a deep comparison of the structures, so a hash
of a hash of a whatever will be compared correctly.
This is especially useful for writing unit tests for your modules!
PUBLIC FUNCTIONS
o $bool = compare($var1, $var2)
Recursively compares $var1 to $var2, returning false if either structure is different than the other at any point. If both are
undefined, it returns true as well, because that is considered equal.
BUGS /NEEDED ENHANCEMENTS
o blessed references
compare currently does not deal with blessed references. I need to look into how to deal with this.
LICENSE
(The MIT License)
Copyright (c) 2001 Ryan Davis, Zen Spider Software
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTHOR
Ryan Davis <ryand-cmp@zenspider.com> Zen Spider Software <http://www.zenspider.com/ZSS/>
perl v5.12.4 2011-07-04 Compare(3pm)