1 | initial version |

You've done it correctly and SAGE gives you the exact answer. If you try log(8,2) you'll get 3 because that's the exact answer and no logs are required. To force a numerical answer try, for example log(1000,2).n(digits=9) to get an approximate answer of 9.96578429. You can check if that's close by typing 2^9.96578429 to get 1000.00000369996. Want a closer answer? Change to digits=12 and repeat. Same thing with other functions such as sqrt(2).n(digits=4)

2 | No.2 Revision |

You've done it correctly and SAGE gives you the exact answer. If you try log(8,2) you'll get 3 because that's the exact answer and no logs are required. To force a numerical answer try, for example log(1000,2).n(digits=9) to get an approximate answer of 9.96578429. You can check if that's close by typing 2^9.96578429 to get 1000.00000369996. Want a closer answer? Change to digits=12 and repeat. Same thing with other functions such as sqrt(2).n(digits=4)

Alternatively, the documentation gives n(log(1000,2)) which gives you the approximation 9.96578428466209 with less key stroke

3 | No.3 Revision |

Alternatively, the documentation gives n(log(1000,2)) which gives you the approximation 9.96578428466209 with less key ~~stroke~~strokes. You can find the log function documentation here

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.