1 #ifndef _tinyfadeighteen_h_ 2 #define _tinyfadeighteen_h_ 9 template <
class T>
class TinyFad<18,T> {
39 void diff(
const size_t ith,
const size_t sz){
61 case 0 : dx0_ = T(1.);
break;
62 case 1 : dx1_ = T(1.);
break;
63 case 2 : dx2_ = T(1.);
break;
64 case 3 : dx3_ = T(1.);
break;
65 case 4 : dx4_ = T(1.);
break;
66 case 5 : dx5_ = T(1.);
break;
67 case 6 : dx6_ = T(1.);
break;
68 case 7 : dx7_ = T(1.);
break;
69 case 8 : dx8_ = T(1.);
break;
70 case 9 : dx9_ = T(1.);
break;
71 case 10 : dx10_ = T(1.);
break;
72 case 11 : dx11_ = T(1.);
break;
73 case 12 : dx12_ = T(1.);
break;
74 case 13 : dx13_ = T(1.);
break;
75 case 14 : dx14_ = T(1.);
break;
76 case 15 : dx15_ = T(1.);
break;
77 case 16 : dx16_ = T(1.);
break;
78 case 17 : dx17_ = T(1.);
break;
79 default : cout <<
"ith = " << ith <<
" out of definition set" << endl;exit(1);
83 TinyFad(
const T& ind,
const int ini) : n(ini+1), val_(ind) {
104 case 0 : dx0_ = T(1.);
break;
105 case 1 : dx1_ = T(1.);
break;
106 case 2 : dx2_ = T(1.);
break;
107 case 3 : dx3_ = T(1.);
break;
108 case 4 : dx4_ = T(1.);
break;
109 case 5 : dx5_ = T(1.);
break;
110 case 6 : dx6_ = T(1.);
break;
111 case 7 : dx7_ = T(1.);
break;
112 case 8 : dx8_ = T(1.);
break;
113 case 9 : dx9_ = T(1.);
break;
114 case 10 : dx10_ = T(1.);
break;
115 case 11 : dx11_ = T(1.);
break;
116 case 12 : dx12_ = T(1.);
break;
117 case 13 : dx13_ = T(1.);
break;
118 case 14 : dx14_ = T(1.);
break;
119 case 15 : dx15_ = T(1.);
break;
120 case 16 : dx16_ = T(1.);
break;
121 case 17 : dx17_ = T(1.);
break;
122 default : cout <<
"ini = " << ini <<
" out of definition set" << endl;exit(1);
189 int N()
const {
return n-1;}
194 const T&
d0()
const {
return dx0_;}
195 T&
d0() {
return dx0_;}
197 const T&
d1()
const {
return dx1_;}
198 T&
d1() {
return dx1_;}
200 const T&
d2()
const {
return dx2_;}
201 T&
d2() {
return dx2_;}
203 const T&
d3()
const {
return dx3_;}
204 T&
d3() {
return dx3_;}
206 const T&
d4()
const {
return dx4_;}
207 T&
d4() {
return dx4_;}
209 const T&
d5()
const {
return dx5_;}
210 T&
d5() {
return dx5_;}
212 const T&
d6()
const {
return dx6_;}
213 T&
d6() {
return dx6_;}
215 const T&
d7()
const {
return dx7_;}
216 T&
d7() {
return dx7_;}
218 const T&
d8()
const {
return dx8_;}
219 T&
d8() {
return dx8_;}
221 const T&
d9()
const {
return dx9_;}
222 T&
d9() {
return dx9_;}
224 const T&
d10()
const {
return dx10_;}
227 const T&
d11()
const {
return dx11_;}
230 const T&
d12()
const {
return dx12_;}
233 const T&
d13()
const {
return dx13_;}
236 const T&
d14()
const {
return dx14_;}
239 const T&
d15()
const {
return dx15_;}
242 const T&
d16()
const {
return dx16_;}
245 const T&
d17()
const {
return dx17_;}
250 case 0 :
return dx0_;
251 case 1 :
return dx1_;
252 case 2 :
return dx2_;
253 case 3 :
return dx3_;
254 case 4 :
return dx4_;
255 case 5 :
return dx5_;
256 case 6 :
return dx6_;
257 case 7 :
return dx7_;
258 case 8 :
return dx8_;
259 case 9 :
return dx9_;
260 case 10 :
return dx10_;
261 case 11 :
return dx11_;
262 case 12 :
return dx12_;
263 case 13 :
return dx13_;
264 case 14 :
return dx14_;
265 case 15 :
return dx15_;
266 case 16 :
return dx16_;
267 case 17 :
return dx17_;
268 default : cout <<
"i out of bounds" << endl;exit(1);
271 const T&
dx(
int i)
const {
273 case 0 :
return dx0_;
274 case 1 :
return dx1_;
275 case 2 :
return dx2_;
276 case 3 :
return dx3_;
277 case 4 :
return dx4_;
278 case 5 :
return dx5_;
279 case 6 :
return dx6_;
280 case 7 :
return dx7_;
281 case 8 :
return dx8_;
282 case 9 :
return dx9_;
283 case 10 :
return dx10_;
284 case 11 :
return dx11_;
285 case 12 :
return dx12_;
286 case 13 :
return dx13_;
287 case 14 :
return dx14_;
288 case 15 :
return dx15_;
289 case 16 :
return dx16_;
290 case 17 :
return dx17_;
291 default : cout <<
"i out of bounds" << endl;exit(1);
296 case 0 :
return dx0_;
297 case 1 :
return dx1_;
298 case 2 :
return dx2_;
299 case 3 :
return dx3_;
300 case 4 :
return dx4_;
301 case 5 :
return dx5_;
302 case 6 :
return dx6_;
303 case 7 :
return dx7_;
304 case 8 :
return dx8_;
305 case 9 :
return dx9_;
306 case 10 :
return dx10_;
307 case 11 :
return dx11_;
308 case 12 :
return dx12_;
309 case 13 :
return dx13_;
310 case 14 :
return dx14_;
311 case 15 :
return dx15_;
312 case 16 :
return dx16_;
313 case 17 :
return dx17_;
314 default : cout <<
"i out of bounds" << endl;exit(1);
317 const T&
d(
int i)
const {
319 case 0 :
return dx0_;
320 case 1 :
return dx1_;
321 case 2 :
return dx2_;
322 case 3 :
return dx3_;
323 case 4 :
return dx4_;
324 case 5 :
return dx5_;
325 case 6 :
return dx6_;
326 case 7 :
return dx7_;
327 case 8 :
return dx8_;
328 case 9 :
return dx9_;
329 case 10 :
return dx10_;
330 case 11 :
return dx11_;
331 case 12 :
return dx12_;
332 case 13 :
return dx13_;
333 case 14 :
return dx14_;
334 case 15 :
return dx15_;
335 case 16 :
return dx16_;
336 case 17 :
return dx17_;
337 default : cout <<
"i out of bounds" << endl;exit(1);
439 dx0_ = dx0_ * in.
val_ + val_ * in.
dx0_;
440 dx1_ = dx1_ * in.
val_ + val_ * in.
dx1_;
441 dx2_ = dx2_ * in.
val_ + val_ * in.
dx2_;
442 dx3_ = dx3_ * in.
val_ + val_ * in.
dx3_;
443 dx4_ = dx4_ * in.
val_ + val_ * in.
dx4_;
444 dx5_ = dx5_ * in.
val_ + val_ * in.
dx5_;
445 dx6_ = dx6_ * in.
val_ + val_ * in.
dx6_;
446 dx7_ = dx7_ * in.
val_ + val_ * in.
dx7_;
447 dx8_ = dx8_ * in.
val_ + val_ * in.
dx8_;
448 dx9_ = dx9_ * in.
val_ + val_ * in.
dx9_;
449 dx10_ = dx10_ * in.
val_ + val_ * in.
dx10_;
450 dx11_ = dx11_ * in.
val_ + val_ * in.
dx11_;
451 dx12_ = dx12_ * in.
val_ + val_ * in.
dx12_;
452 dx13_ = dx13_ * in.
val_ + val_ * in.
dx13_;
453 dx14_ = dx14_ * in.
val_ + val_ * in.
dx14_;
454 dx15_ = dx15_ * in.
val_ + val_ * in.
dx15_;
455 dx16_ = dx16_ * in.
val_ + val_ * in.
dx16_;
456 dx17_ = dx17_ * in.
val_ + val_ * in.
dx17_;
462 if (in.
val_ == 0.)
error(
"TinyFad & TinyFad::operator /= (const TinyFad & in), dividing by 0");
519 if ( in == T(0.) )
error(
"TinyFad & TinyFad::operator /= (const T & in), dividing by 0");
575 template <
class L,
class R>
inline 584 tmp.d0() = un.d0() + deux.d0();
586 tmp.d1() = un.d1() + deux.d1();
588 tmp.d2() = un.d2() + deux.d2();
590 tmp.d3() = un.d3() + deux.d3();
592 tmp.d4() = un.d4() + deux.d4();
594 tmp.d5() = un.d5() + deux.d5();
596 tmp.d6() = un.d6() + deux.d6();
598 tmp.d7() = un.d7() + deux.d7();
600 tmp.d8() = un.d8() + deux.d8();
602 tmp.d9() = un.d9() + deux.d9();
604 tmp.d10() = un.d10() + deux.d10();
606 tmp.d11() = un.d11() + deux.d11();
608 tmp.d12() = un.d12() + deux.d12();
610 tmp.d13() = un.d13() + deux.d13();
612 tmp.d14() = un.d14() + deux.d14();
614 tmp.d15() = un.d15() + deux.d15();
616 tmp.d16() = un.d16() + deux.d16();
618 tmp.d17() = un.d17() + deux.d17();
625 template <
class L,
class R>
inline 654 tmp.d10() = un.d10();
656 tmp.d11() = un.d11();
658 tmp.d12() = un.d12();
660 tmp.d13() = un.d13();
662 tmp.d14() = un.d14();
664 tmp.d15() = un.d15();
666 tmp.d16() = un.d16();
668 tmp.d17() = un.d17();
670 tmp.
val() = un.
val() + deux;
675 template <
class L,
class R>
inline 681 template <
class L,
class R>
inline 690 tmp.d0() = un.d0()*deux.
val() + un.
val() * deux.d0();
692 tmp.d1() = un.d1()*deux.
val() + un.
val() * deux.d1();
694 tmp.d2() = un.d2()*deux.
val() + un.
val() * deux.d2();
696 tmp.d3() = un.d3()*deux.
val() + un.
val() * deux.d3();
698 tmp.d4() = un.d4()*deux.
val() + un.
val() * deux.d4();
700 tmp.d5() = un.d5()*deux.
val() + un.
val() * deux.d5();
702 tmp.d6() = un.d6()*deux.
val() + un.
val() * deux.d6();
704 tmp.d7() = un.d7()*deux.
val() + un.
val() * deux.d7();
706 tmp.d8() = un.d8()*deux.
val() + un.
val() * deux.d8();
708 tmp.d9() = un.d9()*deux.
val() + un.
val() * deux.d9();
710 tmp.d10() = un.d10()*deux.
val() + un.
val() * deux.d10();
712 tmp.d11() = un.d11()*deux.
val() + un.
val() * deux.d11();
714 tmp.d12() = un.d12()*deux.
val() + un.
val() * deux.d12();
716 tmp.d13() = un.d13()*deux.
val() + un.
val() * deux.d13();
718 tmp.d14() = un.d14()*deux.
val() + un.
val() * deux.d14();
720 tmp.d15() = un.d15()*deux.
val() + un.
val() * deux.d15();
722 tmp.d16() = un.d16()*deux.
val() + un.
val() * deux.d16();
724 tmp.d17() = un.d17()*deux.
val() + un.
val() * deux.d17();
731 template <
class L,
class R>
inline 740 tmp.d0() = un.d0()*deux;
742 tmp.d1() = un.d1()*deux;
744 tmp.d2() = un.d2()*deux;
746 tmp.d3() = un.d3()*deux;
748 tmp.d4() = un.d4()*deux;
750 tmp.d5() = un.d5()*deux;
752 tmp.d6() = un.d6()*deux;
754 tmp.d7() = un.d7()*deux;
756 tmp.d8() = un.d8()*deux;
758 tmp.d9() = un.d9()*deux;
760 tmp.d10() = un.d10()*deux;
762 tmp.d11() = un.d11()*deux;
764 tmp.d12() = un.d12()*deux;
766 tmp.d13() = un.d13()*deux;
768 tmp.d14() = un.d14()*deux;
770 tmp.d15() = un.d15()*deux;
772 tmp.d16() = un.d16()*deux;
774 tmp.d17() = un.d17()*deux;
776 tmp.
val() = un.
val() * deux;
781 template <
class L,
class R>
inline 789 template <
class L,
class R>
inline 798 tmp.d0() = un.d0() - deux.d0();
800 tmp.d1() = un.d1() - deux.d1();
802 tmp.d2() = un.d2() - deux.d2();
804 tmp.d3() = un.d3() - deux.d3();
806 tmp.d4() = un.d4() - deux.d4();
808 tmp.d5() = un.d5() - deux.d5();
810 tmp.d6() = un.d6() - deux.d6();
812 tmp.d7() = un.d7() - deux.d7();
814 tmp.d8() = un.d8() - deux.d8();
816 tmp.d9() = un.d9() - deux.d9();
818 tmp.d10() = un.d10() - deux.d10();
820 tmp.d11() = un.d11() - deux.d11();
822 tmp.d12() = un.d12() - deux.d12();
824 tmp.d13() = un.d13() - deux.d13();
826 tmp.d14() = un.d14() - deux.d14();
828 tmp.d15() = un.d15() - deux.d15();
830 tmp.d16() = un.d16() - deux.d16();
832 tmp.d17() = un.d17() - deux.d17();
839 template <
class L,
class R>
inline 848 tmp.d0() -= deux.d0();
850 tmp.d1() -= deux.d1();
852 tmp.d2() -= deux.d2();
854 tmp.d3() -= deux.d3();
856 tmp.d4() -= deux.d4();
858 tmp.d5() -= deux.d5();
860 tmp.d6() -= deux.d6();
862 tmp.d7() -= deux.d7();
864 tmp.d8() -= deux.d8();
866 tmp.d9() -= deux.d9();
868 tmp.d10() -= deux.d10();
870 tmp.d11() -= deux.d11();
872 tmp.d12() -= deux.d12();
874 tmp.d13() -= deux.d13();
876 tmp.d14() -= deux.d14();
878 tmp.d15() -= deux.d15();
880 tmp.d16() -= deux.d16();
882 tmp.d17() -= deux.d17();
884 tmp.
val() = un - deux.
val();
889 template <
class L,
class R>
inline 917 tmp.d10() = un.d10();
919 tmp.d11() = un.d11();
921 tmp.d12() = un.d12();
923 tmp.d13() = un.d13();
925 tmp.d14() = un.d14();
927 tmp.d15() = un.d15();
929 tmp.d16() = un.d16();
931 tmp.d17() = un.d17();
933 tmp.
val() = un.
val() - deux;
938 template <
class L,
class R>
inline 944 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<18,L> & un, const TinyFad<18,R> & deux), dividing by 0");
948 value_type dval = deux.
val();
950 tmp.d0() = ( un.d0()* deux.
val() - un.
val() * deux.d0() ) / dval / dval ;
952 tmp.d1() = ( un.d1()* deux.
val() - un.
val() * deux.d1() ) / dval / dval ;
954 tmp.d2() = ( un.d2()* deux.
val() - un.
val() * deux.d2() ) / dval / dval ;
956 tmp.d3() = ( un.d3()* deux.
val() - un.
val() * deux.d3() ) / dval / dval ;
958 tmp.d4() = ( un.d4()* deux.
val() - un.
val() * deux.d4() ) / dval / dval ;
960 tmp.d5() = ( un.d5()* deux.
val() - un.
val() * deux.d5() ) / dval / dval ;
962 tmp.d6() = ( un.d6()* deux.
val() - un.
val() * deux.d6() ) / dval / dval ;
964 tmp.d7() = ( un.d7()* deux.
val() - un.
val() * deux.d7() ) / dval / dval ;
966 tmp.d8() = ( un.d8()* deux.
val() - un.
val() * deux.d8() ) / dval / dval ;
968 tmp.d9() = ( un.d9()* deux.
val() - un.
val() * deux.d9() ) / dval / dval ;
970 tmp.d10() = ( un.d10()* deux.
val() - un.
val() * deux.d10() ) / dval / dval ;
972 tmp.d11() = ( un.d11()* deux.
val() - un.
val() * deux.d11() ) / dval / dval ;
974 tmp.d12() = ( un.d12()* deux.
val() - un.
val() * deux.d12() ) / dval / dval ;
976 tmp.d13() = ( un.d13()* deux.
val() - un.
val() * deux.d13() ) / dval / dval ;
978 tmp.d14() = ( un.d14()* deux.
val() - un.
val() * deux.d14() ) / dval / dval ;
980 tmp.d15() = ( un.d15()* deux.
val() - un.
val() * deux.d15() ) / dval / dval ;
982 tmp.d16() = ( un.d16()* deux.
val() - un.
val() * deux.d16() ) / dval / dval ;
984 tmp.d17() = ( un.d17()* deux.
val() - un.
val() * deux.d17() ) / dval / dval ;
986 tmp.
val() = un.
val() / dval;
991 template <
class L,
class R>
inline 997 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const L & un, const TinyFad<18,R> & deux), dividing by 0");
1001 value_type dval = deux.
val();
1003 tmp.d0() = - un * deux.d0() / dval / dval ;
1005 tmp.d1() = - un * deux.d1() / dval / dval ;
1007 tmp.d2() = - un * deux.d2() / dval / dval ;
1009 tmp.d3() = - un * deux.d3() / dval / dval ;
1011 tmp.d4() = - un * deux.d4() / dval / dval ;
1013 tmp.d5() = - un * deux.d5() / dval / dval ;
1015 tmp.d6() = - un * deux.d6() / dval / dval ;
1017 tmp.d7() = - un * deux.d7() / dval / dval ;
1019 tmp.d8() = - un * deux.d8() / dval / dval ;
1021 tmp.d9() = - un * deux.d9() / dval / dval ;
1023 tmp.d10() = - un * deux.d10() / dval / dval ;
1025 tmp.d11() = - un * deux.d11() / dval / dval ;
1027 tmp.d12() = - un * deux.d12() / dval / dval ;
1029 tmp.d13() = - un * deux.d13() / dval / dval ;
1031 tmp.d14() = - un * deux.d14() / dval / dval ;
1033 tmp.d15() = - un * deux.d15() / dval / dval ;
1035 tmp.d16() = - un * deux.d16() / dval / dval ;
1037 tmp.d17() = - un * deux.d17() / dval / dval ;
1039 tmp.
val() = un / dval;
1044 template <
class L,
class R>
inline 1050 if (deux == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<18,L> & un, const R & deux), dividing by 0");
1055 tmp.d0() = un.d0() / deux;
1057 tmp.d1() = un.d1() / deux;
1059 tmp.d2() = un.d2() / deux;
1061 tmp.d3() = un.d3() / deux;
1063 tmp.d4() = un.d4() / deux;
1065 tmp.d5() = un.d5() / deux;
1067 tmp.d6() = un.d6() / deux;
1069 tmp.d7() = un.d7() / deux;
1071 tmp.d8() = un.d8() / deux;
1073 tmp.d9() = un.d9() / deux;
1075 tmp.d10() = un.d10() / deux;
1077 tmp.d11() = un.d11() / deux;
1079 tmp.d12() = un.d12() / deux;
1081 tmp.d13() = un.d13() / deux;
1083 tmp.d14() = un.d14() / deux;
1085 tmp.d15() = un.d15() / deux;
1087 tmp.d16() = un.d16() / deux;
1089 tmp.d17() = un.d17() / deux;
1091 tmp.
val() = un.
val() / deux;
1124 if ( in.
val() <= 0)
error(
"TinyFad log (const TinyFad& in) : zero or negative value");
1127 tmp.
d0() = in.
d0() / in.
val();
1128 tmp.
d1() = in.
d1() / in.
val();
1129 tmp.
d2() = in.
d2() / in.
val();
1130 tmp.
d3() = in.
d3() / in.
val();
1131 tmp.
d4() = in.
d4() / in.
val();
1132 tmp.
d5() = in.
d5() / in.
val();
1133 tmp.
d6() = in.
d6() / in.
val();
1134 tmp.
d7() = in.
d7() / in.
val();
1135 tmp.
d8() = in.
d8() / in.
val();
1136 tmp.
d9() = in.
d9() / in.
val();
1151 if ( in.
val() < 0. )
error(
"TinyFad<18,T> sqrt (const TinyFad& in) : negative value");
1155 if ( in.
val() == T(0.) ){
1156 if ( in.
d0() != T(0.) ) test =
false;
1158 if ( in.
d1() != T(0.) ) test =
false;
1160 if ( in.
d2() != T(0.) ) test =
false;
1162 if ( in.
d3() != T(0.) ) test =
false;
1164 if ( in.
d4() != T(0.) ) test =
false;
1166 if ( in.
d5() != T(0.) ) test =
false;
1168 if ( in.
d6() != T(0.) ) test =
false;
1170 if ( in.
d7() != T(0.) ) test =
false;
1172 if ( in.
d8() != T(0.) ) test =
false;
1174 if ( in.
d9() != T(0.) ) test =
false;
1176 if ( in.
d10() != T(0.) ) test =
false;
1178 if ( in.
d11() != T(0.) ) test =
false;
1180 if ( in.
d12() != T(0.) ) test =
false;
1182 if ( in.
d13() != T(0.) ) test =
false;
1184 if ( in.
d14() != T(0.) ) test =
false;
1186 if ( in.
d15() != T(0.) ) test =
false;
1188 if ( in.
d16() != T(0.) ) test =
false;
1190 if ( in.
d17() != T(0.) ) test =
false;
1193 error(
"TinyFad<18,T> sqrt (const TinyFad& in) : null value");
1273 if ( in.
val() == 0)
error(
"TinyFad tan (const TinyFad& in) undiefined in 0.");
1276 T cosinus =
cos(in.
val());
1277 tmp.
d0() = in.
d0() / cosinus / cosinus;
1278 tmp.
d1() = in.
d1() / cosinus / cosinus;
1279 tmp.
d2() = in.
d2() / cosinus / cosinus;
1280 tmp.
d3() = in.
d3() / cosinus / cosinus;
1281 tmp.
d4() = in.
d4() / cosinus / cosinus;
1282 tmp.
d5() = in.
d5() / cosinus / cosinus;
1283 tmp.
d6() = in.
d6() / cosinus / cosinus;
1284 tmp.
d7() = in.
d7() / cosinus / cosinus;
1285 tmp.
d8() = in.
d8() / cosinus / cosinus;
1286 tmp.
d9() = in.
d9() / cosinus / cosinus;
1287 tmp.
d10() = in.
d10() / cosinus / cosinus;
1288 tmp.
d11() = in.
d11() / cosinus / cosinus;
1289 tmp.
d12() = in.
d12() / cosinus / cosinus;
1290 tmp.
d13() = in.
d13() / cosinus / cosinus;
1291 tmp.
d14() = in.
d14() / cosinus / cosinus;
1292 tmp.
d15() = in.
d15() / cosinus / cosinus;
1293 tmp.
d16() = in.
d16() / cosinus / cosinus;
1294 tmp.
d17() = in.
d17() / cosinus / cosinus;
1327 if (un.
val() == 0)
error(
"TinyFad pow (const TinyFad& un, const TinyFad& deux), un = 0. ");
1374 tmp.d0() = e*in.
d0()*
pow((
double)in.
val(), (double)e-1);
1375 tmp.d1() = e*in.
d1()*
pow((
double)in.
val(), (double)e-1);
1376 tmp.d2() = e*in.
d2()*
pow((
double)in.
val(), (double)e-1);
1377 tmp.d3() = e*in.
d3()*
pow((
double)in.
val(), (double)e-1);
1378 tmp.d4() = e*in.
d4()*
pow((
double)in.
val(), (double)e-1);
1379 tmp.d5() = e*in.
d5()*
pow((
double)in.
val(), (double)e-1);
1380 tmp.d6() = e*in.
d6()*
pow((
double)in.
val(), (double)e-1);
1381 tmp.d7() = e*in.
d7()*
pow((
double)in.
val(), (double)e-1);
1382 tmp.d8() = e*in.
d8()*
pow((
double)in.
val(), (double)e-1);
1383 tmp.d9() = e*in.
d9()*
pow((
double)in.
val(), (double)e-1);
1384 tmp.d10() = e*in.
d10()*
pow((
double)in.
val(), (double)e-1);
1385 tmp.d11() = e*in.
d11()*
pow((
double)in.
val(), (double)e-1);
1386 tmp.d12() = e*in.
d12()*
pow((
double)in.
val(), (double)e-1);
1387 tmp.d13() = e*in.
d13()*
pow((
double)in.
val(), (double)e-1);
1388 tmp.d14() = e*in.
d14()*
pow((
double)in.
val(), (double)e-1);
1389 tmp.d15() = e*in.
d15()*
pow((
double)in.
val(), (double)e-1);
1390 tmp.d16() = e*in.
d16()*
pow((
double)in.
val(), (double)e-1);
1391 tmp.d17() = e*in.
d17()*
pow((
double)in.
val(), (double)e-1);
1398 int sign = in.
val() > 0? 1:0;
1400 if (sign)
return in;
1404 template <
class T> std::ostream& operator << (std::ostream& os, const TinyFad<18,T>& a)
1406 os.setf(std::ios::fixed,std::ios::scientific);
1408 os << a.
val() <<
" [";
TinyFad< 18, typename NumericalTraits< L, R >::promote > operator*(const TinyFad< 18, L > &un, const TinyFad< 18, R > &deux)
TinyFad< Num, T > & operator-=(const TinyFad< Num, T > &in)
TinyFad< 18, T > cos(const TinyFad< 18, T > &in)
TinyFad< 18, T > abs(const TinyFad< 18, T > &in)
AutoPointerMutexArrayInit tmp
TinyFad< 18, T > & operator++()
TinyFad< 18, T > operator++(int)
TinyFad< 18, T > pow(const TinyFad< 18, T > &in, double e)
TinyFad(const No_Initialization &)
TinyFad< 18, T > & operator--()
TinyFad< Num, T > & operator=(const TinyFad< Num, T > &in)
TinyFad< Num, T > & operator+=(const TinyFad< Num, T > &in)
TinyFad< Num, T > & operator*=(const TinyFad< Num, T > &in)
void diff(const size_t ith, const size_t sz)
TinyFad< 18, T > log(const TinyFad< 18, T > &in)
TinyFad< 18, T > sqrt(const TinyFad< 18, T > &in)
TinyFad(const TinyFad< 18, T > &in)
TinyFad(const T &ind, const int ini)
TinyFad< 18, T > exp(const TinyFad< 18, T > &in)
TinyFad< 18, T > operator+(const TinyFad< 18, T > &in)
TinyFad< 18, T > sin(const TinyFad< 18, T > &in)
TinyFad< 18, T > tan(const TinyFad< 18, T > &in)
TinyFad< Num, T > & operator/=(const TinyFad< Num, T > &in)
TinyFad< 18, T > operator--(int)
TinyFad< 18, T > operator-(const TinyFad< 18, T > &in)
const T & dx(int i) const
TinyFad< 18, typename NumericalTraits< L, R >::promote > operator/(const TinyFad< 18, L > &un, const TinyFad< 18, R > &deux)