On Wed, Sep 22, 2010 at 7:17 PM, Nicolas Vergnes <[email protected]> wrote: > Hi, > I think matrix operator * is not correctly implemented in the single > precision case. I don't think my problem is only a numerical error linked > with floating point nature. > When I execute this octave script : > A = single([ 12545.125, 134587.125; > 1247.12463378906, 63789.125]) > B = single([ 12.2130002975464, 547854.8125; > 4521.78955078125, 2145.14770507812]) > C_single = single(A) * single(B) > C_double = double(A) * double(B) > C_double_2_2_calculated = C_double(2, 2) > C_single_2_2_calculated = C_single(2, 2) > C_double_2_2_theorical = double(A(2,1)) * double(B(1,2)) + double(A(2,2)) * > double(B(2,2)) > C_single_2_2_theorical = single(A(2,1)) * single(B(1,2)) + single(A(2,2)) * > single(B(2,2)) > I can see these results : > octave:9> script > A = > 12545.125 134587.125 > 1247.12463378906 63789.125 > B = > 12.2130002975464 547854.8125 > 4521.78955078125 2145.14770507812 > C_single = > 608727872 7161616384 > 288456224 820080320 > C_double = > 608727869.110048 7161616366.99088 > 288456230.012003 820080327.51133 > C_double_2_2_calculated = 820080327.51133 > C_single_2_2_calculated = 820080320 > C_double_2_2_theorical = 820080327.51133 > C_single_2_2_theorical = 820080384 > We can see there is no error with float64 numbers but it isn't the same case > with float32 using. > Last information, my octave version is the following : > octave:11> version > ans = 3.2.3 > Best regards, > Nicolas from France > >
What is it exactly that you find suspicious? -- RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
