My Math Forum > Math Can you find some relation
 User Name Remember Me? Password

 Math General Math Forum - For general math related discussion and news

 August 26th, 2016, 06:16 AM #1 Newbie   Joined: Aug 2016 From: india Posts: 1 Thanks: 0 Can you find some relation hey everyone , I am writing a computer program but I am stuck somewhere If you can find any logic or relation between the following data so I can handle of them in one single statement ? i j 1 2 2 5 3 3 4 1 5 4
 August 26th, 2016, 07:34 AM #2 Senior Member     Joined: Sep 2015 From: USA Posts: 2,463 Thanks: 1340 Even if there is some arcane input output relationship between these two arrays it's fairly poor programming to try and force some sort of mathematical formula to describe it. With hardware resources being a mostly insignificant concern these days clarity is a more important property of good code. how about this statement... (in C) j = switch { case 1 : 2; case 2 : 5; case 3 : 3; case 4 : 1; case 5 : 4; default : printf(stderr, "Undefined input\n"); } or a more typical way of doing this is with an array. int f = {2,5,3,1,4}; j = f[i+1]; Last edited by romsek; August 26th, 2016 at 07:47 AM.
 August 26th, 2016, 07:37 AM #3 Senior Member     Joined: Dec 2013 From: some subspace Posts: 212 Thanks: 72 Math Focus: real analysis, vector analysis, numerical analysis, discrete mathematics If one really wish to write a formula for it, maybe $\displaystyle j = \frac{5}{6}i^3 - 7\tfrac{1}{2}i^2 + 19\tfrac{2}{3}i - 11$ works.
 September 8th, 2016, 04:59 AM #4 Senior Member   Joined: Aug 2016 From: morocco Posts: 273 Thanks: 32 2+3*(i-1)-5/20*(i-1)(i-2)+5/6*(i-1)(i-2)(i-3). we use finite differences of Newton method of polynomial interpolation.

 Tags find, relation

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post study7 Number Theory 0 November 12th, 2014 03:54 AM uniquegel Algebra 4 September 8th, 2014 04:18 PM gaussrelatz Applied Math 3 August 31st, 2012 06:51 AM finalight Applied Math 13 October 14th, 2011 09:16 AM robocop_911 Applied Math 0 June 4th, 2008 11:40 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top