Re: init
Jon Harrop wrote:
bob@xxxxxxxxxxxxxx wrote:
why won't this work?
float boxcenter[3];
if (nodectr == 0)
boxcenter = {centerpt[0] + halfwidth/2.0, centerpt[1] + halfwidth/2.0,
centerpt[2] + halfwidth/2.0};
Because you're using the wrong language. Try OCaml:
or Mathematica:
or C++ with a suitable library:
or Perl:
my @boxcenter = map { $_ + $halfwidth/2 } @centerpt;
- Logan
.
Relevant Pages
- RE: float bug? perl 5.8, DBI and oracle 10.2.0
... It's made worse by the binary representation used for floating point on ... expecting to see zero, is not going to work in general. ... perl 5.8, DBI and oracle 10.2.0 ... a number with decimals in it (a float). ... (perl.dbi.users) - float bug? perl 5.8, DBI and oracle 10.2.0
... I am having trouble with a tricky little beast that smells like a bug, ... I noticed this problem while upgrading a large software from perl 5.6.2 to ... I still don't know where to locate the bug. ... using an integer value instead of a float. ... (perl.dbi.users) - Re: Bitfolge ausgeben
... Was soll denn in deinem tollen Algorithmus das Ergebnis von '0.1 & 1' ... Du willst Perl benutzen, aber nicht alle ... Speicherstruktur von Variablen zuzugreifen. ... könnte ja sogar ein float Objekt sein). ... (de.comp.lang.perl.misc) - Re: Bitfolge ausgeben
... internen Speicher als binäre Zahl ausgeben. ... Und deswegen spielt die bitweise Verknüpfung ... Implementierungsdetails sollen von einer Hochsprache wie Perl gerade ... ja sogar ein float Objekt sein). ... (de.comp.lang.perl.misc) - mind-numbing numification
... This is perl, v5.6.1 built for MSWin32-x86-multi-thread ... # There is a subroutine called float() that, well, returns a float. ... Operation sqrt: no method found, argument in overloaded package Rational at ... ... to force floatto be called on the object $fraction, ... (comp.lang.perl.misc) |
|