File size: 455 Bytes
312632d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
library(shiny)
library(Rmpfr)


shinyServer(function(input, output){
      
 
      output$result <- renderText({
            
            precisionBits <- input$precision
            one <- mpfr(1, precBits = precisionBits) 
            e <- exp(one)
            # TODO fix printing...
            x <- capture.output(print(e, ndigits = precisionBits))[2]
            gsub("^\\[1\\] (.+)$", "\\1", x)
            
            
          })
      
    })