float

IE6 float and height

Hi i have 2 divs that floats and IE6 fails on height (its not set from css). If i have letters as g,p,j its cut off the end of these letters. Here is the code <div class="left"> <!-- this div float left --> <span style="color:#666;">Legend : </span> <!-- Here the letter g is cut --> <a title="" class="button" href="#">Cho...

How to use float numbers on BusyBox?

I have little computer, MMnet1000 with BusyBox, and compiling anything on it is nightmare. I want to do something simple like "0,5*2", but can't without additional software. I tried "expr", "let", and just can't do any operation with float numbers. Is there something I can do? UPDATE --- Carl Norum root@MMnet:/kafka# dc -ash: dc: no...

CSS Floated Div height issue, no simple solution?

Hi, I have an issue with CSS I can't solve. I've made a little diagram. Let's say that the pink and green box's height are determined by there content. The pink box could sometimes be the smaller one. What I am trying to do is have the smaller box fix it's height to the outer containing div, so that it would have the same height as ...

How to convert string with exponent to float?

I have the following string: "3.39112632978e+001" which I need to convert to float. WolframAlpha says that the result of this value is 33.9112632978 which evidently I should get somehow and I couldn't figure out how. Single.Parse("3.39112632978e+001") gives 3.39112624E+12 Double.Parse("3.39112632978e+001") gives 3391126329780.0 float....

2 column layout in css without float,position absolute

Anybody any ideas how to achieve this I want this effect <table> <tr><td width=100></td><td width=100></td></tr> </table> I can do it with float, or position absolute, but can it be done without these two? ...

storing money amounts in mysql

I want to store 3.50 into a mysql table. I have a float that I store it in, but it stores as 3.5, not 3.50. How can I get it to have the trailing zero? ...

Permanent line at the bottom of the console window in batch files

Hi guys, Just wondering if anyone knew if it was possible to have a permament line of text at the bottom of a cmd prompt window when running a batch file? So it floats, and if there is a lot of text flowing on the screen, and the cmd prompt starts to scroll, that line of text is still there at the bottom. Cheers, Tim ...

How to convert from IEEE Python float to Microsoft Basic float

I got Python float value and I need to convert it in to Microsoft Basic Float (MBF) format. Luckily, Got some code from internet that does the reverse. def fmsbin2ieee(self,bytes): """Convert an array of 4 bytes containing Microsoft Binary floating point number to IEEE floating point format (which is used by Python)""" as_in...

Converting float to string and getting exact value

This is follow up for my last question about converting string to float I have this value stored in a float variable: 33.9112625 (it's thirty three) and I need to convert it to string and get the exact value but I'm unable to do so. float.ToString( CultureInfo.InvariantCulture) gives me "33.91126" as result. I tried .ToString("G"), "G7"...

Floats, doubles and half floats

I was wondering about how bits are organized on floats (4 bytes), double (8 bytes) and half floats (2 bytes, used on OpenGL implementation). Further, how I could convert from one to another? ...

Hex Representation of Floats in Haskell

I want to convert a Haskell Float to a String that contains the 32-bit hexadecimal representation of the float in standard IEEE format. I can't seem to find a package that will do this for me. Does anybody know of one? I've noticed that GHC.Float offers a function to decompose a Float into its signed base and exponent (decodeFloat), but...

How to fix IE7 float-clear combination

I have a field_wrapper class div which contains the 3 sub divs field_label, field_input and field_error I need to put the field_label, field_input side by side and field_error below the first two. Please see below css code to know how i achieved this, My problem is Its is not working in IE7. clear both applied to the field_error is not...

JSF Float Conversion

I'm using JSF 1.2 with IceFaces 1.8 in a project here. I have a page which is basically a big edit grid for a whole bunch of floating-point number fields. This is implemented with inputText fields on the page pointing at a value object with primitive float types Now, as a new requirement sees some of the fields be nullable, I wanted to...

CSS - Aligning Right with Floats

I'm still pretty green at CSS, having the following CSS / HTML: <input type="reset" value="Clear" style="float: right;" /> <input type="submit" value="Send" style="float: right;" /> Produces the following results: Instead of the desired output: Changing the order of the HTML elements seems to fix the issue but is also counter-in...

How to implement " char * ftoa(float num) " without sprintf() library function in C, C++ and JAVA?

Today I appeared for an interview, and the question was writing my own "char * ftoa(float num) " in C, C++ and Java. Yes, I know float numbers follow IEEE standard while allocating their memory, but I don't know float to char conversion by using Mantissa and Exponent in C. I don't have any idea to solve the above problem in C++ and J...

C-structs, NSObjects, float, int, double, ...

Hello, First of all: this is a though question, sorry for that, but I hope someone can help me! I'm making a UIML renderer on the iPhone. UIML is a language to describe interfaces. I want to render the XML and show the Interface on the iPhone. To inform you bettter, i first explain what I'm doing: <?xml version="1.0"?> <uiml> <in...

How to calculate Min and Max values for IEEE Extended Double precision?

I know that the min and values are: 3.362... 10-4932 1.189... 10+4932 and log(2^14)~4932 which gives me the exponential part. But I can't figure out mantissa. ...

Floating Point Modulo Problem

Hello everyone, I've stumbled onto a very strange bug. Read the comments in the code to see what the bug is exactly, but essentially a variable modulo 1 is returning 1 (but it doesn't equal 1!). I'm assuming there is a display problem where the float is extremely close to one but not exactly. However, it should be moduloing to zero. I c...

Float problem in IE, second floated div causes a 'clear'?

Hi, I'm having problems with the following (example) code. What I'm trying to achieve is the following: div#id1 is a container div. This contains a div with an optional image and a div for body text. Div#id2 is similar. Div#id3 is a container div for the menu. It should be located to the topleft of #container. Now in case there is an im...

Return a float array in C++

Hi, I currently have a 4x4 matrix class in C++ and I store each value as a float: Matrix4d::Matrix4d(const float& m00, const float& m01, const float& m02, const float& m03, const float& m10, const float& m11, const float& m12, const float& m13, const float& m20, const float& m21, const float& m22, ...