<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="IncrediMail 1.0" name=GENERATOR>
<STYLE>
v\:* {behavior:url (#default#vml);}
</STYLE>
<style>v\:* {
        BEHAVIOR: url (#default#vml)
}
</style>
<!--IncrdiXMLRemarkStart>
<IncrdiX-Info>
<X-FID>FLAVOR00-NONE-0000-0000-000000000000</X-FID>
<X-FVER>4.0</X-FVER>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->
</HEAD>
<BODY style="FONT-SIZE: 12pt; MARGIN: 5px 10px 10px; FONT-FAMILY: Arial" bgColor=#ffffff background="" scroll=yes>
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD id=INCREDITEXTREGION style="FONT-SIZE: 12pt; DIRECTION: ltr; FONT-FAMILY: Arial" width="100%">
<DIV>Como andan, les comento que hice un programa que prueba distintas salidas con formato para valores de punto flotante. Lo hice con una union que contiene los distintos tipos de valores flotantes y también con las mismas variables definidas como tales.</DIV>
<DIV>El problema es que en algunos casos la salida con formato no coincide cuando le pongo que me tire el formato del mismo tipo de la variable, y además hay diferencias con la variable común y la que es del tipo union.</DIV>
<DIV>Adjunto código fuente y salida. Como no se si se permite adjuntar en la lista por las dudas pego el código en el cuerpo del mail:</DIV>
<DIV> </DIV>
<DIV>#include <stdio.h></DIV>
<DIV> </DIV>
<DIV>Union flotante {<BR>      float f;<BR>      double d;<BR>      long double ld;<BR>      };</DIV>
<DIV> </DIV>
<DIV><BR>int main(void)<BR>{<BR>    union flotante seba, seba2, seba3;<BR>    float f;<BR>    double d;<BR>    long double ld;<BR>    <BR>    seba.f = f = 3.141516;<BR>    <BR>    printf ("\nPara tipo float:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    seba, seba, seba);<BR>    <BR>    printf ("\nPara tipo float:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    f, f, f);<BR>    <BR>    seba2.d = d = 3.141516;<BR>    <BR>    printf ("\nPara tipo double:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    seba2, seba2, seba2);</DIV>
<DIV> </DIV>
<DIV>    printf ("\nPara tipo double:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    d, d, d);<BR>    <BR>    seba3.ld = ld = 2.00004;<BR>    <BR>    printf ("\nPara tipo long double:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    seba3, seba3, seba3);</DIV>
<DIV> </DIV>
<DIV>    printf ("\nPara tipo long double:\nFloat %f\nDouble %lf\nLong Double %Lf\n",<BR>    ld, ld, ld);<BR>    <BR>    getchar(); //para que no se cierre la ventana<BR>    return 0;<BR>}    <BR></DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><SPAN id=IncrediStamp><A href="http://www.incredimail.com/index.asp?id=97013"><SPAN name="imgCache" border="0"><IMG alt="Emoticones gratis para su correo electrónico - ¡Por IncrediMail! ¡Haga clic aquí!" src="cid:9C570E16-790E-456C-8214-6DB6A8BEE336" border=0></SPAN></A></SPAN></BODY></HTML>