Você está na página 1de 5

PROVA - LETICIA

“Complemento de 2”  O último dígito será negativo


x = 111101010
Convertendo para decimal - FAZ DA DIREITA PARA A ESQUERDA:
0*2^0 + 1*2^1 + 0*2^2 + 1*2^3 + 0*2^4 + 1*2^5 + 1*2^6 + 1*2^7 – 1*2^8
2 + 8 + 32 + 64 + 128 - 256
x = -22
-22/2 = -11
//ans = -11

Base = 2
Expoente = 8
Mantissa = 8
BIAS = 53

s=0
c = 00111011
Convertendo para decimal - FAZ DA DIREITA PARA A ESQUERDA:
1*2^0 + 1*2^1 + 0*2^2 + 1*2^3 + 1*2^4 + 1*2^5 + 0*2^6 + 0*2^7
1 + 2 + 8 + 16 + 32
c= 59
M = 10110100
Convertendo para decimal - FAZ DA ESQUERDA PARA A DIREITA:
1 + 1*2^-1 + 0*2^-2 + 1*2^-3 + 1*2^-4 + 0*2^-5 + 1*2^-6 + 0*2^-7 + 0*2^-8
1 + 0.5 + 0.125 + 0.0625 + 0.015625
M= 1.703125
x = (-1)^0 *1.703125*2^(59-53)
x = 1.703125*2^6
x = 109
//ans = 109

Aplicar no Scilab:
format (25)
x1 = sqrt(%pi*10000)
x = 177.245385090
erro_rel = abs((x-x1)/x)
//ans = 0.0000000000031119575533
//ans = 3.1119575533*10^-12 < 5*10^-12
Como o erro relativo é menor que 5*10^s, teu s vale s.
Como expoente = 12  12 dígitos significativos.
//ans = 12

Aplicar no Scilab:
format (25)
function y = f(x)
y = exp(x)*sin(x)
endfunction

function yl = g(x)
yl = numderivative(f,x)
endfunction

x = 14
abs([g(x)/f(x)]*x)
//ans = 15,932472048898475236456

Entrar no site do Geogebra: https://www.geogebra.org/graphing?lang=pt


Aplicar na calculadora: ((4*x)/((x^2) + 1)) + x - 4
Dar bastante zoom no gráfico com o scroll do mouse onde corta o eixo x
//ans = 2,6956207

Entrar no site do Geogebra: https://www.geogebra.org/graphing?lang=pt


Aplicar na calculadora:
x^3 – x
26*x – (x^2)
Dar bastante zoom no gráfico com o scroll do mouse onde os gráficos se cruzam no eixo
x positivo
//ans = 4,720153

Aplicar no Scilab:
format(25)
function y = f(x)
y = 23*((x - 2)^3) - 7*(x^4)
endfunction

function y=fl(x)
y = numderivative(f,x)
endfunction

function y=fll(x)
y= numderivative(fl,x)
endfunction

x=1
for n=1:20
x=x -fl(x)/fll(x)
end
//ans = 1,1816974376941722368883

(2n² - n) + (2n -1) + (2n -1) + 1


2n² + 3n – 1
2*4136² + 3*4136 – 1
34 225 399
//ans = 34225399

Aplicar no Scilab:
m=270;n=270
U=[]
for i=1:m
for j=1:n
if j-i >= 0
U(i,j)=1;
end
end
end
//
//D=[]
//for i:1:n
//end
D=[]
for i=1:m
for j=1:n
if i == j
D(i,j)=1;
end
end
end

Z = zeros(n,n)
M=zeros(3*m, 3*n)
M = [D Z U;Z D Z;U Z D]

c=0
for i=1:3*m
for j=1:3*m
if M(i,j) <> 0 then
c=c+1
end
end
end

disp(c)

//ans = 73980

Aplicar no Scilab:
format(25)
function [A,b] = matrix_builder(n)
M = zeros(n, n)
for i=1:n
b(i) = -354 / n^2
for j=1:n
if (i == j)
A(i, j) = -2
end
if (abs(i-j) == 1)
A(i, j) = 1
end
end
end
endfunction
[A, b] = matrix_builder(500);
res = max(A \ b)
//ans = 44,427000000002948354449

Você também pode gostar