• 周一. 4月 22nd, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Taylor – Java From 5gw.org

[db:作者]

4月 10, 2022

xmlns=”http://www.w3.org/1999/xhtml” dir=”ltr” lang=”en”>
Taylor – Java
/**
* Bytes CSS
* Style: ‘bytes.answers’; Style ID: 18
*/
@import url(“/clientscript/vbulletin_css/style-12635a82-00018.css”);

 
 
470,370 Members | 1,585 Online

Taylor

mia023

89

Hi i just want to ask if i want to write a java program that compute sin x and cos x using Taylor series. I don’t know the logic about how to write this program and how to get Taylor series through programming

Oct 21 ’07
#1

1 3454


(adsbygoogle = window.adsbygoogle || []).push({});

JosAH

11,448
Expert 8TB

Hi i just want to ask if i want to write a java program that compute sin x and cos x using Taylor series. I don’t know the logic about how to write this program and how to get Taylor series through programming

Can you write down the i-th term of a Taylor expansion of a certain function in
terms of ‘i’? If so you can you can use ‘i’ as a loop invariant counter:

Expand|Select|Wrap|Line Numbers
  1. double taylor= 0;
  2. for (int i= 0; i < max_term_index; i++)
  3.    taylor+= current_term_in_terms_of(i);
  4.  

kind regards,

Jos

Oct 21 ’07
#2


Message
 
Cancel Changes

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.


(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-90111-7’, ‘bytes.com’);
ga(‘send’, ‘pageview’);

loadBytesTracking()

//0){location.replace(‘https://bytes.com/showthread.php?p=’+cpostno);};} }

if(typeof window.orig_onload == “function”) window.orig_onload();
}

//]]>

《Taylor – Java From 5gw.org》有108个想法

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注