Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. .data
  2.  
  3. .text
  4. .global fx
  5. fx:
  6. pushl %ebp
  7. movl %esp,%ebp
  8.  
  9. finit
  10. fldl 8(%ebp)
  11.  
  12. (gdb) info float
  13. =>R7: Valid 0x3bf2bd04000000000000 +1.00272590169167575e-312
  14. R6: Empty 0x00000000000000000000
  15. R5: Empty 0x00000000000000000000
  16. R4: Empty 0x00000000000000000000
  17. R3: Empty 0x00000000000000000000
  18. R2: Empty 0x00000000000000000000
  19. R1: Empty 0x00000000000000000000
  20. R0: Empty 0x00000000000000000000
  21.  
  22. Status Word: 0x3802 DE
  23. TOP: 7
  24. Control Word: 0x037f IM DM ZM OM UM PM
  25. PC: Extended Precision (64-bits)
  26. RC: Round to nearest
  27. Tag Word: 0x3fff
  28. Instruction Pointer: 0x00:0x0804849b
  29. Operand Pointer: 0x00:0xffffcbb0
  30. Opcode: 0xdd45
  31.  
  32. #include <stdio.h>
  33. float fx(float x);
  34. float gx(float x);
  35.  
  36. int main(){
  37.  
  38. float x;
  39. printf("Podaj wartosc x: ");
  40. scanf("%f",&x);
  41. float wynik1 = fx(x);
  42. float wynik2 = gx(x);
  43.  
  44. printf("nWynik funkcji f(x)=%fnWynik funkcji g(x)=%fn",wynik1,wynik2);
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement