本文介绍了双倍和/或浮点数乘法的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我试图将双倍乘以花车(实际上我现在尝试了每一个

可能的组合)并且它永远不会起作用(好吧) ,它做了一些事情

但它总是错的)。我不知道它是什么以及在哪里寻找

帮助,也许有些人知道吗?


double = float * double; (或它的每种可能的组合)。一个例子:


0.3 * 0.7会导致1.7(有更多的数字)。有人知道吗?

如果我改变变量的类型我认为结果保持不变

(但我不是100%肯定)...


Jens

Hi there,

I am trying to multiply doubles with floats (actually I tried every
possible combination by now) and it never works (well, it does something
but it is always wrong). I have no idea what it is and where to look for
help, maybe some of you know?

double=float*double; (or every possible combination of it). An example:

0.3 * 0.7 would result in 1.7 (with lots more digits). Anyone any idea?
If I change the types of the variables I think the result stays the same
(but I am not 100% sure)...

Jens

推荐答案





我没有得到同样的答案:

TH009MA @ th009ma-shl2-01 / cygdrive / d / temp



I don''t get the same answer:
TH009MA@th009ma-shl2-01 /cygdrive/d/temp



这篇关于双倍和/或浮点数乘法的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 13:10