Skip to main content
added 362 characters in body
Source Link
l4m2
  • 28.5k
  • 2
  • 25
  • 103

Given a polynomial in one variable with rational coefficients, output an equivalent expression containing only 1, variables, and definite integrals. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8

Golfing is going to be difficult, because I can't golf just the code or just the output, and I therefore do not know if a change will help or hurt my score until I try it, which sucks in my opinion.

Don't let the score restrict your creation. You are welcomed to answer with mainly one part of the score well optimized, even if the other one badly left.

Given a polynomial in one variable with rational coefficients, output an equivalent expression containing only 1, variables, and definite integrals. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8

Given a polynomial in one variable with rational coefficients, output an equivalent expression containing only 1, variables, and definite integrals. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8

Golfing is going to be difficult, because I can't golf just the code or just the output, and I therefore do not know if a change will help or hurt my score until I try it, which sucks in my opinion.

Don't let the score restrict your creation. You are welcomed to answer with mainly one part of the score well optimized, even if the other one badly left.

edited tags
Link
alephalpha
  • 50k
  • 7
  • 68
  • 182
edited body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

Given a polynomial in one variable with rational coefficients, output an equivalent expression thatcontaining only 1, variables, and definite integrals exist. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8

Given a polynomial in one variable with rational coefficients, output an equivalent expression that only 1, variables, and definite integrals exist. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8

Given a polynomial in one variable with rational coefficients, output an equivalent expression containing only 1, variables, and definite integrals. For example, -x2 can be expressed as ∫x111dtxdu.

E := 1 | var | ∫EEEdvar

Any reasonable input/output method is allowed.

Examples:

\Large 1=1\ \Large x=x\ \Large 0 = \int_1^1 1\text dt\ \Large 2 = \int_{\int_1^{\int_1^1 1\text dv} 1\text du}^1 1\text dt\ \Large x^2=\int_{\int_1^1 1\text dt}^x x\text dv\ \Large \frac 12=\int_{\int_1^1 1\text dt}^1 v\text dv

Your score will be the your code length multiplied by the number of symbols used on the test cases. You should be able to score your program. Lowest score wins.

Test cases:

4/381*x^2+49/8*x^3-17/6
311/59*x^2-92/9*x^3-7/15*x
333/29*x^3+475/96*x^8
Rollback to Revision 4
Source Link
l4m2
  • 28.5k
  • 2
  • 25
  • 103
Loading
added 12 characters in body
Source Link
l4m2
  • 28.5k
  • 2
  • 25
  • 103
Loading
Tweeted twitter.com/StackCodeGolf/status/986316097631727616
added 6 characters in body
Source Link
l4m2
  • 28.5k
  • 2
  • 25
  • 103
Loading
edited title
Link
user202729
  • 17.4k
  • 2
  • 37
  • 70
Loading
Grammar cleanup.
Source Link
xnor
  • 146.6k
  • 26
  • 279
  • 652
Loading
Source Link
l4m2
  • 28.5k
  • 2
  • 25
  • 103
Loading