递归火山软件开发平台

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 火山 源码 类库
查看: 2459|回复: 2
打印 上一主题 下一主题

[视窗] 大佬帮忙指导下易转火山那里错了

[复制链接]

37

主题

585

帖子

2857

积分

金牌会员

Rank: 6Rank: 6

积分
2857
跳转到指定楼层
楼主
发表于 2023-12-22 13:56:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 山梦 于 2023-12-22 18:27 编辑

以上是易代码:-------------------------------

.版本 2
.支持库 spec

.子程序 Enn, 双精度小数型, , 计算E_L0或E_L1或E_L2等
.参数 f, 双精度小数型, 数组
.参数 ff, 双精度小数型, 数组
.参数 t, 双精度小数型
.参数 n, 双精度小数型
.局部变量 v, 双精度小数型
.局部变量 i, 整数型

n = 取整 (n × 取数组成员数 (f) + 0.5)  ' 按百分比取项数
调试输出 (n)
.如果真 (f [1] ≠ ff [1])
    n = n + 3
.如果真结束
.如果真 (n > 取数组成员数 (f))
    n = 取数组成员数 (f)
.如果真结束
v = 0
.变量循环首 (1, n, 3, i)
    v = v + f × 求余弦 (f [i + 1] + t × f [i + 2])
.变量循环尾 ()

返回 (v)

----------------------------------------
以下是火山PC代码
--------------------------------------
<火山程序 类型 = "通常" 版本 = 1 />

常量 SECOND_PER_RAD <公开 类型 = 小数 值 = 206264.806247082 注释 = "180 * 3600 / Math.PI(1弧度对应的角秒)"
        编辑时信息 = "0, 2BFFD4, 0, 0">



方法 Enn <公开 静态 类型 = 小数 注释 = "(地球经度计算用)">
参数 f <类型 = 小数数组类>
参数 ff <类型 = 小数数组类>
参数 t <类型 = 小数>
参数 n <类型 = 单精度小数>
{
    变量 v <类型 = 小数>
    变量 i <类型 = 整数>
    n = 取整 (n * f.取成员数 () + 0.5)  // 按百分比取项数
    如果真 (f.取成员 (1) != ff.取成员 (1))
    {
        n = n + 3
    }
    如果真 (n > f.取成员数 ())
    {
        n = f.取成员数 ()
    }

    v = 0
    循环 (1, 取整 (n), i, 3)
    {
        v = v + f.取成员 (i) * 求余弦 (f.取成员 (i + 1) + t * f.取成员 (i + 2))
    }

    返回 (v)

}

方法 ELon <公开 静态 类型 = 小数 注释 = "(地球经度计算)数组数组" 返回值注释 = "(分点黄经)">
参数 t <类型 = 小数 注释 = "(世纪数)">
参数 n <类型 = 整数 注释 = "(取项数)">
{
    变量 e0 <类型 = "小数 [558]"
            值 = {17534704567, 0, 0, 334165646, 4.669256804, 6283.075849991, 3489428, 4.6261024, 12566.1517, 349706, 2.744118, 5753.384885, 341757, 2.828866, 3.523118, 313590, 3.62767, 77713.771468, 267622, 4.418084, 7860.419392, 234269, 6.135162, 3930.209696, 132429, 0.742464, 11506.76977, 127317, 2.037097, 529.690965, 119917, 1.109629, 1577.343542, 99025, 5.23268, 5884.92685, 90186, 2.04505, 26.29832, 85722, 3.50849, 398.149, 77979, 1.17883, 5223.69392, 75314, 2.53339, 5507.55324, 50526, 4.58293, 18849.22755, 49238, 4.20507, 775.52261, 35666, 2.91954, 0.06731, 31709, 5.84902, 11790.62909, 28413, 1.89869, 796.29801, 27104, 0.31489, 10977.0788, 24281, 0.34481, 5486.77784, 20616, 4.80647, 2544.31442, 20539, 1.86948, 5573.1428, 20226, 2.45768, 6069.77675, 15552, 0.83306, 213.2991, 13221, 3.41118, 2942.46342, 12618, 1.08303, 20.7754, 11513, 0.64545, 0.98032, 10285, 0.636, 4694.00295, 10190, 0.97569, 15720.83878, 10172, 4.2668, 7.11355, 9921, 6.2099, 2146.1654, 9761, 0.681, 155.4204, 8580, 5.9832, 161000.6857, 8513, 1.2987, 6275.9623, 8471, 3.6708, 71430.6956, 7964, 1.8079, 17260.1547, 7876, 3.037, 12036.4607, 7465, 1.7551, 5088.6288, 7387, 3.5032, 3154.6871, 7355, 4.6793, 801.8209, 6963, 0.833, 9437.7629, 6245, 3.9776, 8827.3903, 6115, 1.8184, 7084.8968, 5696, 2.7843, 6286.599, 5612, 4.3869, 14143.4952, 5558, 3.4701, 6279.5527, 5199, 0.1891, 12139.5535, 5161, 1.3328, 1748.0164, 5115, 0.2831, 5856.4777, 4900, 0.4874, 1194.447, 4104, 5.3682, 8429.2413, 4094, 2.3985, 19651.0485, 3920, 6.1683, 10447.3878, 3677, 6.0413, 10213.2855, 3660, 2.5696, 1059.3819, 3595, 1.7088, 2352.8662, 3557, 1.776, 6812.7668, 3329, 0.5931, 17789.8456, 3041, 0.4429, 83996.8473, 3005, 2.7398, 1349.8674, 2535, 3.1647, 4690.4798, 2474, 0.2148, 3.5904, 2366, 0.4847, 8031.0923, 2357, 2.0653, 3340.6124, 2282, 5.222, 4705.7323, 2189, 5.5559, 553.5694, 2142, 1.4256, 16730.4637, 2109, 4.1483, 951.7184, 2030, 0.3713, 283.8593, 1992, 5.2221, 12168.0027, 1986, 5.7747, 6309.3742, 1912, 3.8222, 23581.2582, 1889, 5.3863, 149854.4001, 1790, 2.2149, 13367.9726, 1748, 4.5605, 135.0651, 1622, 5.9884, 11769.8537, 1508, 4.1957, 6256.7775, 1442, 4.1932, 242.7286, 1435, 3.7236, 38.0277, 1397, 4.4014, 6681.2249, 1362, 1.8893, 7632.9433, 1250, 1.1305, 5.5229, 1205, 2.6223, 955.5997, 1200, 1.0035, 632.7837, 1129, 0.1774, 4164.312, 1083, 0.3273, 103.0928, 1052, 0.9387, 11926.2544, 1050, 5.3591, 1592.596, 1033, 6.1998, 6438.4962, 1001, 6.0291, 5746.2713, 980, 0.999, 11371.705, 980, 5.244, 27511.468, 938, 2.624, 5760.498, 923, 0.483, 522.577, 922, 4.571, 4292.331, 905, 5.337, 6386.169, 862, 4.165, 7058.598, 841, 3.299, 7234.794, 836, 4.539, 25132.303, 813, 6.112, 4732.031, 812, 6.271, 426.598, 801, 5.821, 28.449, 787, 0.996, 5643.179, 776, 2.957, 23013.54, 769, 3.121, 7238.676, 758, 3.974, 11499.656, 735, 4.386, 316.392, 731, 0.607, 11513.883, 719, 3.998, 74.782, 706, 0.323, 263.084, 676, 5.911, 90955.552, 663, 3.665, 17298.182, 653, 5.791, 18073.705, 630, 4.717, 6836.645, 615, 1.458, 233141.314, 612, 1.075, 19804.827, 596, 3.321, 6283.009, 596, 2.876, 6283.143, 555, 2.452, 12352.853, 541, 5.392, 419.485, 531, 0.382, 31441.678, 519, 4.065, 6208.294, 513, 2.361, 10973.556, 494, 5.737, 9917.697, 450, 3.272, 11015.106, 449, 3.653, 206.186, 447, 2.064, 7079.374, 435, 4.423, 5216.58, 421, 1.906, 245.832, 413, 0.921, 3738.761, 402, 0.84, 20.355, 387, 1.826, 11856.219, 379, 2.344, 3.881, 374, 2.954, 3128.389, 370, 5.031, 536.805, 365, 1.018, 16200.773, 365, 1.083, 88860.057, 352, 5.978, 3894.182, 352, 2.056, 244287.6, 351, 3.713, 6290.189, 340, 1.106, 14712.317, 339, 0.978, 8635.942, 339, 3.202, 5120.601, 333, 0.837, 6496.375, 325, 3.479, 6133.513, 316, 5.089, 21228.392, 316, 1.328, 10873.986, 309, 3.646, 10.637, 303, 1.802, 35371.887, 296, 3.397, 9225.539, 288, 6.026, 154717.61, 281, 2.585, 14314.168, 262, 3.856, 266.607, 262, 2.579, 22483.849, 257, 1.561, 23543.231, 255, 3.949, 1990.745, 251, 3.744, 10575.407, 240, 1.161, 10984.192, 238, 0.106, 7.046, 236, 4.272, 6040.347, 234, 3.577, 10969.965, 211, 3.714, 65147.62, 210, 0.754, 13521.751, 207, 4.228, 5650.292, 202, 0.814, 170.673, 201, 4.629, 6037.244, 200, 0.381, 6172.87, 199, 3.933, 6206.81, 199, 5.197, 6262.3, 197, 1.046, 18209.33, 195, 1.07, 5230.807, 195, 4.869, 36.028, 194, 4.313, 6244.943, 192, 1.229, 709.933, 192, 5.595, 6282.096, 192, 0.602, 6284.056, 189, 3.744, 23.878, 188, 1.904, 15.252, 188, 0.867, 22003.915, 182, 3.681, 15110.466, 181, 0.491, 1.484, 179, 3.222, 39302.097, 179, 1.259, 12559.038}
            注释 = "558">
    变量 e1 <类型 = "小数 [342]"
            值 = {6.283319667475e+013, 0, 0, 20605886, 2.67823456, 6283.07584999, 430343, 2.635127, 12566.1517, 42526, 1.59047, 3.52312, 11926, 5.79557, 26.29832, 10898, 2.96618, 1577.34354, 9348, 2.5921, 18849.2275, 7212, 1.1385, 529.691, 6777, 1.8747, 398.149, 6733, 4.4092, 5507.5532, 5903, 2.888, 5223.6939, 5598, 2.1747, 155.4204, 4541, 0.398, 796.298, 3637, 0.4662, 775.5226, 2896, 2.6471, 7.1135, 2084, 5.3414, 0.9803, 1910, 1.8463, 5486.7778, 1851, 4.9686, 213.2991, 1729, 2.9912, 6275.9623, 1623, 0.0322, 2544.3144, 1583, 1.4305, 2146.1654, 1462, 1.2053, 10977.0788, 1246, 2.8343, 1748.0164, 1188, 3.258, 5088.6288, 1181, 5.2738, 1194.447, 1151, 2.075, 4694.003, 1064, 0.7661, 553.5694, 997, 1.303, 6286.599, 972, 4.239, 1349.867, 945, 2.7, 242.729, 858, 5.645, 951.718, 758, 5.301, 2352.866, 639, 2.65, 9437.763, 610, 4.666, 4690.48, 583, 1.766, 1059.382, 531, 0.909, 3154.687, 522, 5.661, 71430.696, 520, 1.854, 801.821, 504, 1.425, 6438.496, 433, 0.241, 6812.767, 426, 0.774, 10447.388, 413, 5.24, 7084.897, 374, 2.001, 8031.092, 356, 2.429, 14143.495, 350, 4.8, 6279.553, 337, 0.888, 12036.461, 337, 3.862, 1592.596, 325, 3.4, 7632.943, 322, 0.616, 8429.241, 318, 3.188, 4705.732, 297, 6.07, 4292.331, 295, 1.431, 5746.271, 290, 2.325, 20.355, 275, 0.935, 5760.498, 270, 4.804, 7234.794, 253, 6.223, 6836.645, 228, 5.003, 17789.846, 225, 5.672, 11499.656, 215, 5.202, 11513.883, 208, 3.955, 10213.286, 208, 2.268, 522.577, 206, 2.224, 5856.478, 206, 2.55, 25132.303, 203, 0.91, 6256.778, 189, 0.532, 3340.612, 188, 4.735, 83996.847, 179, 1.474, 4164.312, 178, 3.025, 5.523, 177, 3.026, 5753.385, 159, 4.637, 3.286, 157, 6.124, 5216.58, 155, 3.077, 6681.225, 154, 4.2, 13367.973, 143, 1.191, 3894.182, 138, 3.093, 135.065, 136, 4.245, 426.598, 134, 5.765, 6040.347, 128, 3.085, 5643.179, 127, 2.092, 6290.189, 125, 3.077, 11926.254, 125, 3.445, 536.805, 114, 3.244, 12168.003, 112, 2.318, 16730.464, 111, 3.901, 11506.77, 111, 5.32, 23.878, 105, 3.75, 7860.419, 103, 2.447, 1990.745, 96, 0.82, 3.88, 96, 4.08, 6127.66, 91, 5.42, 206.19, 91, 0.42, 7079.37, 88, 5.17, 11790.63, 81, 0.34, 9917.7, 80, 3.89, 10973.56, 78, 2.4, 1589.07, 78, 2.58, 11371.7, 77, 3.98, 955.6, 77, 3.36, 36.03, 76, 1.3, 103.09, 75, 5.18, 10969.97, 75, 4.96, 6496.37, 73, 5.21, 38.03, 72, 2.65, 6309.37, 70, 5.61, 3738.76, 69, 2.6, 3496.03, 69, 0.39, 15.25, 69, 2.78, 20.78, 65, 1.13, 7058.6, 64, 4.28, 28.45, 61, 5.63, 10984.19, 60, 0.73, 419.48, 60, 5.28, 10575.41, 58, 5.55, 17298.18, 58, 3.19, 4732.03}
            注释 = "342">
    变量 e2 <类型 = "小数 [180]"
            值 = {5291887, 0, 0, 871984, 1.072097, 6283.07585, 30913, 0.86729, 12566.1517, 2734, 0.053, 3.5231, 1633, 5.1883, 26.2983, 1575, 3.6846, 155.4204, 954, 0.757, 18849.228, 894, 2.057, 77713.771, 695, 0.827, 775.523, 506, 4.663, 1577.344, 406, 1.031, 7.114, 381, 3.441, 5573.143, 346, 5.141, 796.298, 317, 6.053, 5507.553, 302, 1.192, 242.729, 289, 6.117, 529.691, 271, 0.306, 398.149, 254, 2.28, 553.569, 237, 4.381, 5223.694, 208, 3.754, 0.98, 168, 0.902, 951.718, 153, 5.759, 1349.867, 145, 4.364, 1748.016, 134, 3.721, 1194.447, 125, 2.948, 6438.496, 122, 2.973, 2146.165, 110, 1.271, 161000.686, 104, 0.604, 3154.687, 100, 5.986, 6286.599, 92, 4.8, 5088.63, 89, 5.23, 7084.9, 83, 3.31, 213.3, 76, 3.42, 5486.78, 71, 6.19, 4690.48, 68, 3.43, 4694, 65, 1.6, 2544.31, 64, 1.98, 801.82, 61, 2.48, 10977.08, 50, 1.44, 6836.65, 49, 2.34, 1592.6, 46, 1.31, 4292.33, 46, 3.81, 149854.4, 43, 0.04, 7234.79, 40, 4.94, 7632.94, 39, 1.57, 71430.7, 38, 3.17, 6309.37, 35, 0.99, 6040.35, 35, 0.67, 1059.38, 31, 3.18, 2352.87, 31, 3.55, 8031.09, 30, 1.92, 10447.39, 30, 2.52, 6127.66, 28, 4.42, 9437.76, 28, 2.71, 3894.18, 27, 0.67, 25132.3, 26, 5.27, 6812.77, 25, 0.55, 6279.55, 23, 1.38, 4705.73, 22, 0.64, 6256.78, 20, 6.07, 640.88 }
            注释 = "180">
    变量 EL0 <类型 = 小数数组类>
    变量 EL1 <类型 = 小数数组类>
    变量 EL2 <类型 = 小数数组类>
    变量 EL3 <类型 = 小数数组类>
    变量 EL4 <类型 = 小数数组类>
    变量 EL5 <类型 = 小数数组类>
    变量 t2 <类型 = 小数>
    变量 t3 <类型 = 小数>
    变量 t4 <类型 = 小数>
    变量 t5 <类型 = 小数>
    变量 v <类型 = 小数>
    // EL0.加入成员 (10000000000, 20, 578, 920, 1100, 1124, 1136, 1148, 1217, 1226, 1229, 1229, 1229, 1229, 1937, 2363, 2618, 2633, 2660, 2666)  // 20
    计次循环 (558)
    {
        EL0.加入成员 (e0 [取循环索引 ()])
    }
    计次循环 (342)
    {
        EL1.加入成员 (e1 [取循环索引 ()])
    }
    计次循环 (180)
    {
        EL2.加入成员 (e2 [取循环索引 ()])
    }
    EL3.加入成员 (28923, 5.84384, 6283.07585, 3496, 0, 0, 1682, 5.4877, 12566.1517, 296, 5.196, 155.42, 129, 4.722, 3.523, 71, 5.3, 18849.23, 64, 5.97, 242.73, 40, 3.79, 553.57)  // 24
    EL4.加入成员 (11408, 3.14159, 0, 772, 4.134, 6283.076, 77, 3.84, 12566.15, 42, 0.42, 155.42)  // 12
    EL5.加入成员 (88, 3.14, 0, 17, 2.77, 6283.08, 5, 2.01, 155.42, 3, 2.21, 12566.15)  // 12

    t = t / 10  // 转为千年数

    如果 (n < 0)
    {
        n = 1
    }
    否则
    {
        n = 3 * n / 558  // EL0.取成员数 ()  // 558 取数组成员数 (EL0)

    }
    t2 = t * t
    t3 = t2 * t
    t4 = t3 * t
    t5 = t4 * t
    v = Enn (EL0, EL0, t, n)
    v = v + Enn (EL1, EL0, t, n) * t
    v = v + Enn (EL2, EL0, t, n) * t2
    v = v + Enn (EL3, EL0, t, n) * t3
    v = v + Enn (EL4, EL0, t, n) * t4
    v = v + Enn (EL5, EL0, t, n) * t5
    v = v / 10000000000
   //v= 1523672860820.505600
    v = v + (-0.0728 - 2.7702 * t - 1.1019 * t2 - 0.0996 * t3) / SECOND_PER_RAD

    返回 (v)

}

---------------------------------------------------------------------------
帮忙下,万分感谢!






回复

使用道具 举报

5

主题

89

帖子

1252

积分

核心用户

Rank: 9Rank: 9Rank: 9

积分
1252
沙发
发表于 2023-12-22 16:14:11 | 只看该作者
火山数组从0开始易从1
回复

使用道具 举报

37

主题

585

帖子

2857

积分

金牌会员

Rank: 6Rank: 6

积分
2857
板凳
 楼主| 发表于 2023-12-22 17:17:04 | 只看该作者
老道 发表于 2023-12-22 16:14
火山数组从0开始易从1

感谢提醒!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|递归火山软件开发平台 ( 鄂ICP备18029190号 )

GMT+8, 2024-11-24 03:30 , Processed in 0.085000 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表