float

Where does C++ standard define the value range of float types?

As far as I know floating point values are of the form n * 2^e, with float range being n = -(2^23-1) - (2^23-1), and e = -126 - 127, double range being n = -(2^52-1) - (2^52-1), and e = -1022 - 1023 I was looking through the C++ standard, but failed to find the place where the standard specifies this, or mandates the association of t...

linq to sql strange float behaviour

Hello, I have a problem with a double (TaxRate here), that do not have the same value when it pass through functions: I first call a function DataContext.UpdateCategory(theCategorie.Code, theCategorie.Description, theCategorie.TaxRate, theCategorie.TaxCode); When I run the debugger the value of TaxRate is 19.6 Then when I put a stop...

css float problem

I have about 8 paragraphs which I would like to float left, but some of the paragraphs have more text than others. So when I view in a browser, I get the left to right floating that I want, but I get multiple short paragraphs in a column when some paragraphs are longer and some are shorter. What I want is for each new paragraph to be i...

How to put text over an image without absolute positioning or setting the image as backbround

Hi, I'm trying to see if it is possible to put some text over an image without using position: absolute or having the image being, the background of an element. The reason for the constraints is that the HTML code is going into an e-mail, and it turns out that hotmail supports neither. I remember that when I first began studying CSS, fid...

How Decimal places are converted using FLOAT in SQL Server 2000/2005/2008

Hi, in this SO question the OP wanted to drop the 0's in the decimal places for his results. Now the example I gave (below) to get around this was to CAST with DECIMAL, then CAST with FLOAT. e.g. SELECT CAST(0.55 AS FLOAT) Using the example above and running it in SQL Server 2005/2008 would seem to bring up the correct result of 0.5...

How to read a binary file and display the output as a float in C?

Hi, I'm trying to read 4-byte numbers stored in a binary file, but I don't seem to be getting the correct output. Here's my code: #include <stdio.h> #include <stdlib.h> int main () { int res; FILE *file; float v; //Open file file = fopen("prj3.dat", "rb"); if (!file) { printf("Unable to open file input.dat\n"); } ...

How do ldexp and frexp work in python?

The python frexp and ldexp functions splits floats into mantissa and exponent. Do anybody know if this process exposes the actual float structure, or if it requires python to do expensive logarithmic calls? ...

What is the range of values a float can have in Python?

What are its smallest and biggest values in python? ...

use two divs in parallel in IE

Thanks for answering ...

how to make a div to wrap two float divs inside?

I don't know if it's a common problem, but I can't find the solution in web so far. I would like to have two divs wrapped inside another div, however these two divs inside have to be align the same level (for example: left one takes 20%width of the wrappedDiv, right one take another 80%). To achieve this purpose, I used the following exa...

How can I make a float top with CSS?

I know that CSS only supports left and right values for the float property, but is there a technique to implement a floating top? I will try to explain. I have the following code: <div style="float:left"> <div style="float:left"> <div style="float:left"> .... With this code every div is floated to left until the right limit of the pag...

Center float boxes horizontally

I want to display some floating boxes (divs containing thumbnails) and the number of thumbnails depends on the current page width. For example: <div class="container"> <div class="box1" style="float:left;width:120px;height:120px;margin-right:10px;">Thumbnail image here</div> <div class="box2" style="float:left;width:120px;height:120...

A floating point array in C

i am developing a code where i have to load floating point values stored in each line at a time in a text file...i loaded each of these data into a array of floats using fscanf()...however i found that the floating points were stored in a different way, example 407.18 was stored as 407.179993, 414.35 as 414.350006...now i am stuck becaus...

Float align display:inline problem

<div style="display:inline;"> <textarea rows="10" cols="50"></textarea><br /> <div style="float:right;">remaining characters: 300</div> It is not working in either firefox or IE. The text remaining characters is not within the "inline" bounds instead goes 100% out of the containing div. what is the best way of accomplish something ...

Firefox floated <ul>... extra top padding or margin, even after default reset?

I've got a simple floated horizontal list that is looking good in IE and Opera, but Firefox has extra padding or margin at the top that I don't know how to fix.. It looked fine until I had to add a display:inline to an image link next to it because of another issue, so I think it's something to do with the display attribute.. any ideas? ...

Code doesn't work without .show() - jQuery

this.randomtip = function(){ var length = $("#showcase ul li").length; var ran = Math.floor(Math.random()*length) + 1; $("#showcase ul li:nth-child(" + ran + ")").show(); }; randomtip(); ..the code above works well with .show() in the end, but if I change it to .addClass('show') it won't work. I'd like to g...

show decimal or double with zeros

hi i get price values from DB. now whenever the price is perhaps 5, I want to show 5.00 if its 4.3 it should be 4.30. how to convert that? thanks ...

Stacking DIVs in top of each other?

Hi, Is it possible to stack up multiple DIVs like: <div> <div></div> <div></div> <div></div> <div></div> </div> So that all those inner DIVs have the same X and Y position? By default they all go below each other increasing the Y position by the height of the last previous DIV. I have a feeling some sort of float or display or other...

GSEventSetBacklightLevel from a plist value iPhone

I'm trying to set the backlight display from a plist value, but I keep getting an error! So I guess my question is how can I convert a plist value to a float value so I can set the backlight form the plist entry? The Code: float customBacklight = (float)[[plistDict floatForKey:@"Backlight Level"] floatValue]; GSEventSetBacklightLevel(c...

problem in printing floating point

hi I am using IAR c compiler, I am trying to print floating point value like printf("version number: %f\n",1.4); but I am always getting like below in console version number:ERROR help please thanks in advance kudi ...