View Single Post
Old 07 April 2019, 10:34   #10
Fook42
Registered User
 
Join Date: Aug 2016
Location: germany
Posts: 67
Quote:
Originally Posted by alkis View Post
Nope. The compiler did constant folding. It's a mess. If you need to play with floats/doubles use the standard C library
i found out that the compiler will include mathieeesingbas, mathieeedoubbas and mathieeedoubtrans when i use a "real" float-calculation
Code:
volatile int y = 32;
  float x = 1.623 * (float) y;
but.. if i open these math-libraries manually (like dos-lib).. the generated output will contain 2 times these library-names (and i guess also, it contains 2 times the opening)..

i added this after the dos-opening inside the main routine:
Code:
struct MathIEEEBase *MathIeeeSingBasBase   = (struct MathIEEEBase *)OpenLibrary((STRPTR)"mathieeesingbas.library",0);
struct MathIEEEBase *MathIeeeDoubBasBase   = (struct MathIEEEBase *)OpenLibrary((STRPTR)"mathieeedoubbas.library",0);
struct MathIEEEBase *MathIeeeDoubTransBase = (struct MathIEEEBase *)OpenLibrary((STRPTR)"mathieeedoubtrans.library",0);
-> here is part of the hexdump of the file with the double libs (note that dos-lib is not there twice!)

00000000 00 00 03 f3 00 00 00 00 00 00 00 03 00 00 00 00 |................|
00000010 00 00 00 02 00 00 00 a0 00 00 00 18 00 00 00 02 |................|
00000020 00 00 03 e9 00 00 00 a0 4e f9 00 00 00 dc 00 00 |........N.......|
00000030 16 c0 4e 75 4e 55 ff 00 48 e7 30 3a 28 6d 00 08 |..NuNU..H.0m..|
00000040 2c 5c 20 6d 00 0c 43 ed 00 10 47 ed ff 00 45 fa |,\ m..C...G...E.|
00000050 ff e0 4e ae fd f6 26 2c 00 04 24 0b 2f 0b 4e b9 |..N...&,..$./.N.|
00000060 00 00 02 3c 2c 54 22 03 26 00 4e ae ff d0 4c ed |...<,T".&.N...L.|
00000070 5c 0c fe e8 4e 5d 4e 75 64 6f 73 2e 6c 69 62 72 |\...N]Nudos.libr|
00000080 61 72 79 00 6d 61 74 68 69 65 65 65 73 69 6e 67 |ary.mathieeesing|
00000090 62 61 73 2e 6c 69 62 72 61 72 79 00 6d 61 74 68 |bas.library.math|
000000a0 69 65 65 65 64 6f 75 62 62 61 73 2e 6c 69 62 72 |ieeedoubbas.libr|
000000b0 61 72 79 00 6d 61 74 68 69 65 65 65 64 6f 75 62 |ary.mathieeedoub|
000000c0 74 72 61 6e 73 2e 6c 69 62 72 61 72 79 00 4a 75 |trans.library.Ju|
000000d0 73 74 20 61 20 68 65 6c 6c 6f 20 77 6f 72 6c 64 |st a hello world|
...
00000280 20 2f 00 08 22 2f 00 0c 4e ae ff 9a 2c 5f 4e 75 | /.."/..N...,_Nu|
00000290 6d 61 74 68 69 65 65 65 64 6f 75 62 62 61 73 2e |mathieeedoubbas.|
000002a0 6c 69 62 72 61 72 79 00 00 00 03 ec 00 00 00 07 |library.........|
000002b0 00 00 00 00 00 00 00 02 00 00 00 38 00 00 01 6c |...........8...l|
...
00000310 00 00 00 00 00 00 02 68 00 00 00 00 00 00 00 2c |.......h.......,|
00000320 00 00 00 00 00 00 00 48 6d 61 74 68 69 65 65 65 |.......Hmathieee|
00000330 64 6f 75 62 74 72 61 6e 73 2e 6c 69 62 72 61 72 |doubtrans.librar|
00000340 79 00 00 00 6d 61 74 68 69 65 65 65 73 69 6e 67 |y...mathieeesing|
00000350 62 61 73 2e 6c 69 62 72 61 72 79 00 00 00 03 ec |bas.library.....|

Last edited by Fook42; 07 April 2019 at 10:42.
Fook42 is offline  
 
Page generated in 0.05805 seconds with 11 queries