/* The compiler must use the same floating point arithmetic as the target
- * platform, otherwise expressions will yield a different result when
- * evaluated in the compiler or on the target platform. Since writing a target
- * and source library is almost double the work, we will at least add the
- * hooks here, and define functions for a plug in library that may be added
- * at a later time. Currently we use the builtin data types of the compiler
- * that translates cc65.
- */
+** platform, otherwise expressions will yield a different result when
+** evaluated in the compiler or on the target platform. Since writing a target
+** and source library is almost double the work, we will at least add the
+** hooks here, and define functions for a plug in library that may be added
+** at a later time. Currently we use the builtin data types of the compiler
+** that translates cc65.
+*/
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
/* Convert an integer into a floating point variable */
{
Float D;
- D.V = Val;
+ D.V = (float) Val;
return D;
}
unsigned char* FP_D_Data (Double Val)
/* Return the raw data of a double in a malloc'ed buffer. Free after use. */
{
- float F = Val.V;
+ float F = (float) Val.V;
return memcpy (xmalloc (F_SIZE), &F, F_SIZE);
}
D.V = Left.V / Right.V;
return D;
}
-
-
-