Sponsored Content
Full Discussion: floating point problem
Top Forums Programming floating point problem Post 302109587 by matrixmadhan on Tuesday 6th of March 2007 11:15:22 PM
Old 03-07-2007
Code:
#include <stdio.h>

int main()
{
  int i;
  float f=1.0;

  for( i=0; i<9; i++, f /= 10 ) {
    printf("%10.8f\n", f);
  }
  return 0;
}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with floating point numbers in awk

hi all, i have the following problem using awk in a script i want to read the values from a column with real numbers and calculate the mean.the problem is that when i use a statement such as this num = $4 i cant find a way to convert the variable from string to floating point to perform... (7 Replies)
Discussion started by: kanagias
7 Replies

2. 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

3. 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

4. Linux

Floating Point Exception

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)
Discussion started by: Mandar123
3 Replies

5. Programming

Floating point Emulator

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

6. Shell Programming and Scripting

how to compare 2 floating point no.

Hi, Could any one tell me how to compare to floating point no. using test command. As -eq option works on only intergers. i=5.4 if then echo "equal" else echo "not equal" fi here output will be equal even though no. are unequal. Thanks, ravi (1 Reply)
Discussion started by: useless79
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

floating point number problem

Hello folks I Hope everyone is fine. I am calculating number of bytes calculation from apache web log. awk '{ sum += $10 } END { print sum }' /var/httpd/log/mydomain.log 7.45557e+09 it show above number, what should i do it sow number like 7455, i mean if after decimal point above 5 it... (5 Replies)
Discussion started by: learnbash
5 Replies

9. Shell Programming and Scripting

problem with floating point number loops

Hey, I guess I am just to stupid and am not seeing the "wood for the trees", but I am always getting strange errors. I want to create a mesh with coordinates like: x y z 3.1 3.0 0.75 0 0 1 3.1 2.9 0.75 0 0 1 3.1 2.8 0.75 0 0 1 3.1 2.7 0.75 0 0 1 3.0 ... (10 Replies)
Discussion started by: ergy1983
10 Replies

10. 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
IMAGICKDRAW(3)								 1							    IMAGICKDRAW(3)

The ImagickDraw class

CLASS SYNOPSIS
ImagickDraw ImagickDraw o bool ImagickDraw::affine (array $affine) o bool ImagickDraw::annotation (float $x, float $y, string $text) o bool ImagickDraw::arc (float $sx, float $sy, float $ex, float $ey, float $sd, float $ed) o bool ImagickDraw::bezier (array $coordinates) o bool ImagickDraw::circle (float $ox, float $oy, float $px, float $py) o bool ImagickDraw::clear (void ) o ImagickDraw ImagickDraw::clone (void ) o bool ImagickDraw::color (float $x, float $y, int $paintMethod) o bool ImagickDraw::comment (string $comment) o bool ImagickDraw::composite (int $compose, float $x, float $y, float $width, float $height, Imagick $compositeWand) o ImagickDraw::__construct (void ) o bool ImagickDraw::destroy (void ) o bool ImagickDraw::ellipse (float $ox, float $oy, float $rx, float $ry, float $start, float $end) o string ImagickDraw::getClipPath (void ) o int ImagickDraw::getClipRule (void ) o int ImagickDraw::getClipUnits (void ) o ImagickPixel ImagickDraw::getFillColor (void ) o float ImagickDraw::getFillOpacity (void ) o int ImagickDraw::getFillRule (void ) o string ImagickDraw::getFont (void ) o string ImagickDraw::getFontFamily (void ) o float ImagickDraw::getFontSize (void ) o public int ImagickDraw::getFontStretch (void ) o int ImagickDraw::getFontStyle (void ) o int ImagickDraw::getFontWeight (void ) o int ImagickDraw::getGravity (void ) o bool ImagickDraw::getStrokeAntialias (void ) o ImagickPixel ImagickDraw::getStrokeColor (void ) o array ImagickDraw::getStrokeDashArray (void ) o float ImagickDraw::getStrokeDashOffset (void ) o int ImagickDraw::getStrokeLineCap (void ) o int ImagickDraw::getStrokeLineJoin (void ) o int ImagickDraw::getStrokeMiterLimit (void ) o float ImagickDraw::getStrokeOpacity (void ) o float ImagickDraw::getStrokeWidth (void ) o int ImagickDraw::getTextAlignment (void ) o bool ImagickDraw::getTextAntialias (void ) o int ImagickDraw::getTextDecoration (void ) o string ImagickDraw::getTextEncoding (void ) o public float ImagickDraw::getTextInterlineSpacing (void ) o public float ImagickDraw::getTextInterwordSpacing (void ) o public float ImagickDraw::getTextKerning (void ) o ImagickPixel ImagickDraw::getTextUnderColor (void ) o string ImagickDraw::getVectorGraphics (void ) o bool ImagickDraw::line (float $sx, float $sy, float $ex, float $ey) o bool ImagickDraw::matte (float $x, float $y, int $paintMethod) o bool ImagickDraw::pathClose (void ) o bool ImagickDraw::pathCurveToAbsolute (float $x1, float $y1, float $x2, float $y2, float $x, float $y) o bool ImagickDraw::pathCurveToQuadraticBezierAbsolute (float $x1, float $y1, float $x, float $y) o bool ImagickDraw::pathCurveToQuadraticBezierRelative (float $x1, float $y1, float $x, float $y) o bool ImagickDraw::pathCurveToQuadraticBezierSmoothAbsolute (float $x, float $y) o bool ImagickDraw::pathCurveToQuadraticBezierSmoothRelative (float $x, float $y) o bool ImagickDraw::pathCurveToRelative (float $x1, float $y1, float $x2, float $y2, float $x, float $y) o bool ImagickDraw::pathCurveToSmoothAbsolute (float $x2, float $y2, float $x, float $y) o bool ImagickDraw::pathCurveToSmoothRelative (float $x2, float $y2, float $x, float $y) o bool ImagickDraw::pathEllipticArcAbsolute (float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y) o bool ImagickDraw::pathEllipticArcRelative (float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y) o bool ImagickDraw::pathFinish (void ) o bool ImagickDraw::pathLineToAbsolute (float $x, float $y) o bool ImagickDraw::pathLineToHorizontalAbsolute (float $x) o bool ImagickDraw::pathLineToHorizontalRelative (float $x) o bool ImagickDraw::pathLineToRelative (float $x, float $y) o bool ImagickDraw::pathLineToVerticalAbsolute (float $y) o bool ImagickDraw::pathLineToVerticalRelative (float $y) o bool ImagickDraw::pathMoveToAbsolute (float $x, float $y) o bool ImagickDraw::pathMoveToRelative (float $x, float $y) o bool ImagickDraw::pathStart (void ) o bool ImagickDraw::point (float $x, float $y) o bool ImagickDraw::polygon (array $coordinates) o bool ImagickDraw::polyline (array $coordinates) o bool ImagickDraw::pop (void ) o bool ImagickDraw::popClipPath (void ) o bool ImagickDraw::popDefs (void ) o bool ImagickDraw::popPattern (void ) o bool ImagickDraw::push (void ) o bool ImagickDraw::pushClipPath (string $clip_mask_id) o bool ImagickDraw::pushDefs (void ) o bool ImagickDraw::pushPattern (string $pattern_id, float $x, float $y, float $width, float $height) o bool ImagickDraw::rectangle (float $x1, float $y1, float $x2, float $y2) o bool ImagickDraw::render (void ) o public void ImagickDraw::resetVectorGraphics (void ) o bool ImagickDraw::rotate (float $degrees) o bool ImagickDraw::roundRectangle (float $x1, float $y1, float $x2, float $y2, float $rx, float $ry) o bool ImagickDraw::scale (float $x, float $y) o bool ImagickDraw::setClipPath (string $clip_mask) o bool ImagickDraw::setClipRule (int $fill_rule) o bool ImagickDraw::setClipUnits (int $clip_units) o bool ImagickDraw::setFillAlpha (float $opacity) o bool ImagickDraw::setFillColor (ImagickPixel $fill_pixel) o bool ImagickDraw::setFillOpacity (float $fillOpacity) o bool ImagickDraw::setFillPatternURL (string $fill_url) o bool ImagickDraw::setFillRule (int $fill_rule) o bool ImagickDraw::setFont (string $font_name) o bool ImagickDraw::setFontFamily (string $font_family) o bool ImagickDraw::setFontSize (float $pointsize) o bool ImagickDraw::setFontStretch (int $fontStretch) o bool ImagickDraw::setFontStyle (int $style) o bool ImagickDraw::setFontWeight (int $font_weight) o bool ImagickDraw::setGravity (int $gravity) o public void ImagickDraw::setResolution (string $x_resolution, string $y_resolution) o bool ImagickDraw::setStrokeAlpha (float $opacity) o bool ImagickDraw::setStrokeAntialias (bool $stroke_antialias) o bool ImagickDraw::setStrokeColor (ImagickPixel $stroke_pixel) o bool ImagickDraw::setStrokeDashArray (array $dashArray) o bool ImagickDraw::setStrokeDashOffset (float $dash_offset) o bool ImagickDraw::setStrokeLineCap (int $linecap) o bool ImagickDraw::setStrokeLineJoin (int $linejoin) o bool ImagickDraw::setStrokeMiterLimit (int $miterlimit) o bool ImagickDraw::setStrokeOpacity (float $stroke_opacity) o bool ImagickDraw::setStrokePatternURL (string $stroke_url) o bool ImagickDraw::setStrokeWidth (float $stroke_width) o bool ImagickDraw::setTextAlignment (int $alignment) o bool ImagickDraw::setTextAntialias (bool $antiAlias) o bool ImagickDraw::setTextDecoration (int $decoration) o bool ImagickDraw::setTextEncoding (string $encoding) o public void ImagickDraw::setTextInterlineSpacing (float $spacing) o public void ImagickDraw::setTextInterwordSpacing (float $spacing) o public void ImagickDraw::setTextKerning (float $kerning) o bool ImagickDraw::setTextUnderColor (ImagickPixel $under_color) o bool ImagickDraw::setVectorGraphics (string $xml) o bool ImagickDraw::setViewbox (int $x1, int $y1, int $x2, int $y2) o bool ImagickDraw::skewX (float $degrees) o bool ImagickDraw::skewY (float $degrees) o bool ImagickDraw::translate (float $x, float $y) PHP Documentation Group IMAGICKDRAW(3)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy