practical02_sol - Practical Session 2 Solutions Exercises...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Practical Session 2 Solutions Exercises 1. The machine accuracy is between 10- 8 and 10- 7 it is actually 2- 24 5 . 96 10- 8 , so to two digits 6 . 10- 8 . Heres a suitable code. / * machine_acc.c * Program to determine the machine accuracy, i.e. the smallest number * that can be added to one to give a number different from one. * / #include <stdio.h> int main() { float eps; float x; printf("Test value of eps: "); scanf("%f", &eps); x = 1.0 + eps; if (x == 1.0) printf("1.0+%g = 1.0\n", eps); else printf("1.0+%g != 1.0\n", eps); return 0; } 2. (a) You need to solve x 2 + K a x- K a = 0 , where K a = 1 . 76 10- 5 . The solution required is the positive root, which is about 4 . 2 10- 3 , so the percentage ionisation is about 0.42%. (b) The pH is about 2.4. (c) You need to solve x 2 = K a , which gives x 4 . 195 10- 3 M , compared with 4 . 186 10- 3 M in (a), so they differ by about 0.2%....
View Full Document

Page1 / 2

practical02_sol - Practical Session 2 Solutions Exercises...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online