谁能写出合适的 ChatGPT 提示词按如下要求整理下列文本?

331 天前
 akjarjash

原始网页数据: https://cplusplus.com/reference/cmath/

对于下列文本:

Functions

Trigonometric functions
cos	Compute cosine (function)
sin	Compute sine (function)
tan	Compute tangent (function)
acos	Compute arc cosine (function)
asin	Compute arc sine (function)
atan	Compute arc tangent (function)
atan2	Compute arc tangent with two parameters (function)

Hyperbolic functions
cosh	Compute hyperbolic cosine (function)
sinh	Compute hyperbolic sine (function)
tanh	Compute hyperbolic tangent (function)
acosh	Compute area hyperbolic cosine (function)
asinh	Compute area hyperbolic sine (function)
atanh	Compute area hyperbolic tangent (function)

Exponential and logarithmic functions
exp	Compute exponential function (function)
frexp	Get significand and exponent (function)
ldexp	Generate value from significand and exponent (function)
log	Compute natural logarithm (function)
log10	Compute common logarithm (function)
modf	Break into fractional and integral parts (function)
exp2	Compute binary exponential function (function)
expm1	Compute exponential minus one (function)
ilogb	Integer binary logarithm (function)
log1p	Compute logarithm plus one (function)
log2	Compute binary logarithm (function)
logb	Compute floating-point base logarithm (function)
scalbn	Scale significand using floating-point base exponent (function)
scalbln	Scale significand using floating-point base exponent (long) (function)

Power functions
pow	Raise to power (function)
sqrt	Compute square root (function)
cbrt	Compute cubic root (function)
hypot	Compute hypotenuse (function)

Error and gamma functions
erf	Compute error function (function)
erfc	Compute complementary error function (function)
tgamma	Compute gamma function (function)
lgamma	Compute log-gamma function (function)

Rounding and remainder functions
ceil	Round up value (function)
floor	Round down value (function)
fmod	Compute remainder of division (function)
trunc	Truncate value (function)
round	Round to nearest (function)
lround	Round to nearest and cast to long integer (function)
llround	Round to nearest and cast to long long integer (function)
rint	Round to integral value (function)
lrint	Round and cast to long integer (function)
llrint	Round and cast to long long integer (function)
nearbyint	Round to nearby integral value (function)
remainder	Compute remainder (IEC 60559) (function)
remquo	Compute remainder and quotient (function)

Floating-point manipulation functions
copysign	Copy sign (function)
nan	Generate quiet NaN (function)
nextafter	Next representable value (function)
nexttoward	Next representable value toward precise value (function)

Minimum, maximum, difference functions
fdim	Positive difference (function)
fmax	Maximum value (function)
fmin	Minimum value (function)

Other functions
fabs	Compute absolute value (function)
abs	Compute absolute value (function)
fma	Multiply-add (function)

Macros / Functions
These are implemented as macros in C and as functions in C++:
Classification macro / functions
fpclassify	Classify floating-point value (macro/function)
isfinite	Is finite value (macro)
isinf	Is infinity (macro/function)
isnan	Is Not-A-Number (macro/function)
isnormal	Is normal (macro/function)
signbit	Sign bit (macro/function)

Comparison macro / functions
isgreater	Is greater (macro)
isgreaterequal	Is greater or equal (macro)
isless	Is less (macro)
islessequal	Is less or equal (macro)
islessgreater	Is less or greater (macro)
isunordered	Is unordered (macro)

Macro constants
math_errhandling	Error handling (macro)
INFINITY	Infinity (constant)
NAN	Not-A-Number (constant)
HUGE_VAL	Huge value (constant)
HUGE_VALF	Huge float value
HUGE_VALL	Huge long double value (constant)

This header also defines the following macro constants (since C99/C++11):
macro	type	description
MATH_ERRNO
MATH_ERREXCEPT	int	Bitmask value with the possible values math_errhandling can take.
FP_FAST_FMA
FP_FAST_FMAF
FP_FAST_FMAL	int	Each, if defined, identifies for which type fma is at least as efficient as x*y+z.
FP_INFINITE
FP_NAN
FP_NORMAL
FP_SUBNORMAL
FP_ZERO	int	The possible values returned by fpclassify.
FP_ILOGB0
FP_ILOGBNAN	int	Special values the ilogb function may return.

Types
double_t	Floating-point type (type)
float_t	Floating-point type (type)

要求整理成

整理后的结果形如:

函数

750 次点击
所在节点    程序员
7 条回复
fwin3001
331 天前
把你的要求贴给 poe 的 gpt-4 ,好像就已经是你要的结果了。不需要进一步调教提示词

**函数**

- 三角函数

| 函数 | 描述 |
|--------------|-------------------------------|
| cos | 计算余弦(函数) |
| sin | 计算正弦(函数) |
| tan | 计算正切(函数) |
| acos | 计算反余弦(函数) |
| asin | 计算反正弦(函数) |
| atan | 计算反正切(函数) |
| atan2 | 计算带有两个参数的反正切(函数) |

- 双曲函数

| 函数 | 描述 |
|--------------|-----------------------------------|
| cosh | 计算双曲余弦(函数) |
| sinh | 计算双曲正弦(函数) |
| tanh | 计算双曲正切(函数) |
| acosh | 计算反双曲余弦(函数) |
| asinh | 计算反双曲正弦(函数) |
| atanh | 计算反双曲正切(函数) |

- 指数和对数函数

| 函数 | 描述 |
|--------------|---------------------------------------|
| exp | 计算指数函数(函数) |
| frexp | 获取有效数字和指数(函数) |
| ldexp | 从有效数字和指数生成值(函数) |
| log | 计算自然对数(函数) |
| log10 | 计算常用对数(函数) |
| modf | 将值分解为小数和整数部分(函数) |
| exp2 | 计算二进制指数函数(函数) |
| expm1 | 计算指数减一(函数) |
| ilogb | 计算整数二进制对数(函数) |
| log1p | 计算对数加一(函数) |
| log2 | 计算二进制对数(函数) |
| logb | 计算浮点数基对数(函数) |
| scalbn | 使用浮点数基指数缩放有效数字(函数) |
| scalbln | 使用浮点数基指数(长)缩放有效数字(函数)|

- 幂函数

| 函数 | 描述 |
|--------------|-------------------------------|
| pow | 计算幂(函数) |
| sqrt | 计算平方根(函数) |
| cbrt | 计算立方根(函数) |
| hypot | 计算斜边(函数) |

- 误差和伽玛函数

| 函数 | 描述 |
|--------------|-------------------------------|
| erf | 计算误差函数(函数) |
| erfc | 计算余补误差函数(函数) |
| tgamma | 计算伽玛函数(函数) |
| lgamma | 计算对数伽玛函数(函数) |

- 舍入和余数函数

| 函数 | 描述 |
|--------------|-----------------------------------|
| ceil | 向上舍入值(函数) |
| floor | 向下舍入值(函数) |
| fmod | 计算除法余数(函数) |
| trunc | 截断值(函数) |
| round | 舍入到最接近的整数(函数) |
| lround | 舍入到最接近的长整数(函数) |
| llround | 舍入到最接近的长长整数(函数) |
| rint | 舍入到整数值(函数) |
| lrint | 舍入并转换为长整数(函数) |
| llrint | 舍入并转换为长长整数(函数) |
| nearbyint | 舍入到附近的整数值(函数) |
| remainder | 计算余数( IEC 60559 )(函数) |
|remquo | 计算余数和商(函数) |

- 浮点数操作函数

| 函数 | 描述 |
|--------------|---------------------------------------|
| copysign | 复制符号(函数) |
| nan | 生成安静 NaN (函数) |
| nextafter | 下一个可表示值(函数) |
| nexttoward | 朝向精确值的下一个可表示值(函数) |

- 最小值、最大值、差值函数

| 函数 | 描述 |
|--------------|-------------------------------|
| fdim | 正差值(函数) |
| fmax | 最大值(函数) |
| fmin | 最小值(函数) |

- 其他函数

| 函数 | 描述 |
|--------------|-------------------------------|
| fabs | 计算绝对值(函数) |
| abs | 计算绝对值(函数) |
| fma | 乘法加法(函数) |

- 宏定义 /函数

这些在 C 中实现为宏,在 C++ 中实现为函数:

| 宏定义 /函数 | 描述 |
|------------------|-------------------------------|
| fpclassify | 分类浮点值(宏 /函数) |
| isfinite | 是否有限值(宏) |
| isinf | 是否无穷(宏 /函数) |
| isnan | 是否非数字(宏 /函数) |
| isnormal | 是否正常(宏 /函数) |
| signbit | 符号位(宏 /函数) |

- 比较宏 /函数

| 宏定义 /函数 | 描述 |
|------------------|-------------------------------|
| isgreater | 是否更大(宏) |
| isgreaterequal | 是否大于等于(宏) |
| isless | 是否更小(宏) |
| islessequal | 是否小于等于(宏) |
| islessgreater | 是否更小或更大(宏) |
| isunordered | 是否无序(宏) |

- 宏常量

| 宏常量 | 描述 |
|------------------|-------------------------------|
| math_errhandling | 错误处理(宏) |
| INFINITY | 无穷(常量) |
| NAN | 非数字(常量) |
| HUGE_VAL | 巨大值(常量) |
| HUGE_VALF | 巨大浮点值 |
| HUGE_VALL | 巨大长双精度值(常量) |

此头文件还定义了以下宏常量(自 C99/C++11 起):

| 宏常量 | 类型 | 描述 |
|------------------|--------|-------------------------------------|
| MATH_ERRNO | | |
| MATH_ERREXCEPT | int | math_errhandling 可以采用的位掩码值。 |
| FP_FAST_FMA | | |
| FP_FAST_FMAF | | |
| FP_FAST_FMAL | int | 对于哪种类型的 fma 至少与 x*y+z 一样高效。|
| FP_INFINITE | | |
| FP_NAN | | |
| FP_NORMAL | | |
| FP_SUBNORMAL | | |
| FP_ZERO | int | fpclassify 可能返回的值。 |
| FP_ILOGB0 | | |
| FP_ILOGBNAN | int | ilogb 函数可能返回的特殊值。 |

- 类型

| 类型 | 描述 |
|--------------|---------------------------|
| double_t | 浮点类型(类型) |
| float_t | 浮点类型(类型) |
akjarjash
331 天前
@fwin3001 嗯,好像是能整理一部分,但是整理不全,另外表格没有正确的缩进。我刚刚又试了 ChatGPT 全新清空之前的内容,新建了一个对话,发现每次整理后不断下达优化指令是可以的,但是如果想要根据提示词一次性的完成我想要的结果还是不可以的。
感觉最好的应该介于(程序人员手动精确编程处理)与 ( ChatGPT 自然语言编程处理)之间,但是达到(程序人员手动精确编程处理)的效果,这是 OpenAI 公司应该研究的,现在的处理在谋定形式上还是基于概率和可能性的
akjarjash
331 天前
大家尝试一下,我测试的是要不断提示才可以最终完美,大家尝试下有没有一次性就完美完成该项功能的
fwin3001
331 天前
我觉得这么细致的需求,就算 gpt-5 6 7 都未必能一步到位。毕竟不是大众共识的某些普遍事物或理解,现在基于统计来生成是合理的。

我的话,是希望给出更合理的推算。例如官方计算数学题这个个例子 https://platform.openai.com/docs/guides/gpt-best-practices/strategy-give-gpts-time-to-think ,第一次回答不太合理;第二次明确告诉要自己算一次

下一代应该默认就第二次那种输出。除非特别注明不要想马上答,视为脑筋急转弯那种
jmk92
331 天前
你好,这是必应。我可以帮你整理文本,但是我不能保证完全正确。你可以参考以下的结果:

函数

• 三角函数

| 函数名 | 计算功能 |
| :----: | :------: |
| cos | 计算余弦 |
| sin | 计算正弦 |
| tan | 计算正切 |
| acos | 计算反余弦 |
| asin | 计算反正弦 |
| atan | 计算反正切 |
| atan2 | 计算两参数的反正切 |

• 双曲函数

| 函数名 | 计算功能 |
| :----: | :------------: |
| cosh | 计算双曲余弦 |
| sinh | 计算双曲正弦 |
| tanh | 计算双曲正切 |
| acosh | 计算反双曲余弦 |
| asinh | 计算反双曲正弦 |
| atanh | 计算反双曲正切 |

• 指数和对数函数

| 函数名 | 计算功能 |
| :----: | :------------------: |
| exp | 计算指数函数 |
| frexp | 获取有效数和指数 |
| ldexp | 根据有效数和指数生成值 |
| log | 计算自然对数 |
| log10 | 计算常用对数 |
| modf | 分解为小数和整数部分 |
| exp2 | 计算二进制指数 |
| expm1 | 计算指数减一 |
| ilogb | 计算整数二进制对数 |
| log1p | 计算对数加一 |
| log2 | 计算二进制对数 |
| logb | 计算浮点数底数的对数 |
| scalbn | 根据浮点数底数的指数缩放有效数 |
| scalbln | 根据浮点数底数的长整型指数缩放有效数 |

• 幂函数

| 函数名 | 计算功能 |
| :----: | :--------------: |
| pow | 求幂运算 |
| sqrt | 求平方根 |
| cbrt | 求立方根 |
| hypot | 求直角三角形斜边长度 |

• 错误和伽玛函数

| 函数名 | 计算功能 |
| :----: | :------------------: |
| erf | 计算误差函数 |
| erfc | 计算余误差函数 |
| tgamma | 计算伽玛函数 |
| lgamma | 计算伽玛函数的自然对数 |

• 舍入和余数函数

| 函数名 | 计算功能 |
| :-----: | :----------------------: |
| ceil | 向上取整 |
| floor | 向下取整 |
| fmod | 求除法的余数 |
| trunc | 截断小数部分 |
| round | 四舍五入 |
| lround | 四舍五入并转换为长整型 |
| llround | 四舍五入并转换为长长整型 |
| rint | 舍入到整型值 |
| lrint 舍入并转换为长整型
| llrint | 舍入并转换为长长整型 |
| nearbyint | 舍入到最近的整型值 |
| remainder | 计算余数( IEC 60559 标准) |
| remquo | 计算余数和商 |

• 浮点数操作函数

| 函数名 | 计算功能 |
| :----: | :------: |
| copysign | 复制符号 |
| nan | 生成静默 NaN |
| nextafter | 下一个可表示的值 |
| nexttoward | 下一个朝向精确值的可表示的值 |

• 最小值,最大值,差值函数

| 函数名 | 计算功能 |
| :----: | :------: |
| fdim | 正差值 |
| fmax | 最大值 |
| fmin | 最小值 |

• 其他函数

| 函数名 | 计算功能 |
| :----: | :------: |
| fabs | 计算绝对值 |
| abs | 计算绝对值 |
| fma | 乘加运算 |

宏 /函数

这些在 C 中是宏,在 C++ 中是函数:
• 分类宏 /函数

| 宏 /函数名 | 计算功能 |
| :-------: | :------: |
| fpclassify | 分类浮点数值 |
| isfinite | 判断是否为有限值 |
| isinf | 判断是否为无穷大 |
| isnan | 判断是否为非数值 |
| isnormal | 判断是否为正常值 |
| signbit | 判断符号位 |

• 比较宏 /函数

| 宏 /函数名 | 计算功能 |
| :-------: | :------: |
| isgreater | 判断是否大于 |
| isgreaterequal | 判断是否大于等于 |
| isless | 判断是否小于 |
| islessequal | 判断是否小于等于 |
| islessgreater | 判断是否小于或大于 |
| isunordered | 判断是否无序 |

宏常量

这个头文件还定义了以下的宏常量(自 C99/C++11 起):
• math_errhandling 错误处理(宏)

• INFINITY 无穷大(常量)

• NAN 非数值(常量)

• HUGE_VAL 巨大值(常量)

• HUGE_VALF 巨大浮点数值

• HUGE_VALL 巨大长双精度浮点数值(常量)

这个头文件还定义了以下的宏常量(自 C99/C++11 起):
• MATH_ERRNO

MATH_ERREXCEPT 整型,表示 math_errhandling 可能取的位掩码值。
• FP_FAST_FMA

FP_FAST_FMAF
FP_FAST_FMAL 整型,如果定义了,表示对应类型的 fma 函数至少和 x*y+z 一样高效。
• FP_INFINITE

FP_NAN
FP_NORMAL
FP_SUBNORMAL
FP_ZERO 整型,表示 fpclassify 返回的可能值。
• FP_ILOGB0

FP_ILOGBNAN 整型,表示 ilogb 函数可能返回的特殊值。

类型

• double_t 浮点数类型(类型)

• float_t 浮点数类型(类型)
akjarjash
330 天前
@jmk92 最后两个识别错了😄 必应现在感觉智力降低了
akjarjash
330 天前
@fwin3001 #4 嗯 是的 但是如果再提供几次样本数据之后还是会出现变动,就是不能一直稳定产出

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/948902

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX