create account

RE: Computation Contest #4 [2 SBI] by kaeserotor

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @quantumdeveloper/computation-contest-4-2-sbi

· @kaeserotor ·
![integrate.JPG](https://cdn.steemitimages.com/DQmc53b3ejpLTcVYeAPujBm6u4ooFCYd6yeUdo32cgn9kS5/integrate.JPG)

So the idea here is to approximate the function in some way in small steps. I used rectangles, triangles would be fine too. You calculate the area of each rectangle and sum them all up to get the area under e^(x)/x within the given intervall. I slowly decreased the step size because I wasn't sure how much my PC could handle. 
My reputation is currently 57, and the code gave a result of 1.0156373595307505e+23. This is in good accordance with wolfram alpha (1.015643...e+23), a deviation shows up 5 digits behind the comma. You can improve this with more computation power or time.
👍  ,
properties (23)
authorkaeserotor
permlinkq0s1t0
categoryprogramming
json_metadata{"image":["https://cdn.steemitimages.com/DQmc53b3ejpLTcVYeAPujBm6u4ooFCYd6yeUdo32cgn9kS5/integrate.JPG"],"app":"steemit/0.1"}
created2019-11-10 23:41:18
last_update2019-11-10 23:41:18
depth1
children0
last_payout2019-11-17 23:41:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length694
author_reputation18,015,148,601,358
root_title"Computation Contest #4 [2 SBI]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,383,898
net_rshares18,742,581,426
author_curate_reward""
vote details (2)