theorem

How to use inline R code in a bookdown theorem or example environment

a 夏天 提交于 2021-02-07 12:23:31
问题 I use bookdown to generate documents in both html and PDF. How could I use results from inline R code in theorem and example environments? Here is what I tried: --- title: "Test" output: bookdown::pdf_book: toc: false html_document: toc: false --- ```{r} a <- 2 b <- 3 ``` If $a = `r a`$ and $b = `r b`$, then $a + b = `r a + b`$. ```{theorem} If $a = `r a`$ and $b = `r b`$, then $a + b = `r a + b`$. ``` ```{example} If $a = `r a`$ and $b = `r b`$, then $a + b = `r a + b`$. ``` and I get 回答1:

Why number are (not) representable in double precision IEEE754?

柔情痞子 提交于 2020-01-06 21:12:33
问题 I am confused on IEEE754 double precision, I consider two questions: 1. Why each number from interval -2 54 , -2 54 +2, -2 54 +4...2 54 is representable ? 2. Why 2 54 +2 is not representable ? Can you help me ? I understand way of working IEEE754 - however, I have a problem with seeing it. 回答1: There are 53 bits in the significand (or mantissa) of an IEEE 754 double. −2 54 can be exactly represented, as mantissa: 1.00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00 (bin) exponent:

Why number are (not) representable in double precision IEEE754?

邮差的信 提交于 2020-01-06 21:11:00
问题 I am confused on IEEE754 double precision, I consider two questions: 1. Why each number from interval -2 54 , -2 54 +2, -2 54 +4...2 54 is representable ? 2. Why 2 54 +2 is not representable ? Can you help me ? I understand way of working IEEE754 - however, I have a problem with seeing it. 回答1: There are 53 bits in the significand (or mantissa) of an IEEE 754 double. −2 54 can be exactly represented, as mantissa: 1.00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00 (bin) exponent:

Has anyone tried proving Z3 with Z3 itself?

故事扮演 提交于 2019-12-05 16:03:15
问题 Has anyone tried proving Z3 with Z3 itself? Is it even possible, to prove that Z3 is correct, using Z3? More theoretical, is it possible to prove that tool X is correct, using X itself? 回答1: The short answer is: “no, nobody tried to prove Z3 using Z3 itself” :-) The sentence “we proved program X to be correct” is very misleading. The main problem is: what does it mean to be correct. In the case of Z3, one could say that Z3 is correct if, at least, it never returns “sat” for an unsatisfiable