entropie / ralpha

ruby lib for wolfram alpha api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ralpha – accessing the Wolfram|Alpha api with ruby with lots of KISS


  puts Ralpha["pi"]

  Query 'pi' Success=true
   > Input
    : pi {Image:true}
   > Decimal approximation [More digits]
    : 3.1415926535897932384626433832795028841971693993751058209749... {Image:true}
   > Property
    : pi is a transcendental number {Image:true}
   > Continued fraction [Fraction form, More terms]
    : [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, ...] {Image:true}
   > Alternative representations [More]
    : pi = 180 ° {Image:true}
    : pi = -i log(-1) {Image:true}
    : pi = cos^(-1)(-1) {Image:true}
      should a have nice inspect

  puts Ralpha["pi"].pods[1].states.first.subquery

  Query [DecimalApproximation__More digits] Success [true]
   > Input
    : pi {Image:true}
   > Decimal approximation [Fewer digits, More digits]
    : 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282... {Image:true}
   > Property
    : pi is a transcendental number {Image:true}
   > Number line
    :  {Image:true}
   > Continued fraction [Fraction form, More terms]
    : [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, ...] {Image:true}
   > Alternative representations [More]
    : pi = 180 ° {Image:true}
    : pi = -i log(-1) {Image:true}
    : pi = cos^(-1)(-1) {Image:true}
   > Series representations [More]
    : pi = 4 sum_(k=0)^infinity(-1)^k/(2 k+1) {Image:true}
    : pi = -2+2 sum_(k=1)^infinity2^k/(2 k
  k) {Image:true}
    : pi = sum_(k=0)^infinity(50 k-6)/(2^k (3 k
  k)) {Image:true}
   > Integral representations [More]
    : pi = 2 integral_0^infinity1/(t^2+1) dt {Image:true}
    : pi = 4 integral_0^1sqrt(1-t^2) dt {Image:true}
    : pi = 2 integral_0^infinity(sin(t))/t dt {Image:true}
      should return a new Query instance on #query

This is Alpha code and will not work.

About

ruby lib for wolfram alpha api


Languages

Language:Ruby 100.0%